mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
d3dxof: Make sure the returned object pointer is null when there is no more object.
This commit is contained in:
parent
36d4e1ea59
commit
40b15a380d
1 changed files with 6 additions and 1 deletions
|
@ -988,17 +988,22 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
|
|||
if (This->nb_xobjects >= MAX_OBJECTS)
|
||||
{
|
||||
ERR("Too many objects\n");
|
||||
*ppDataObj = NULL;
|
||||
return DXFILEERR_NOMOREOBJECTS;
|
||||
}
|
||||
|
||||
/* Check if there are templates defined before the object */
|
||||
if (!parse_templates(&This->buf)) {
|
||||
if (!parse_templates(&This->buf))
|
||||
{
|
||||
hr = DXFILEERR_BADVALUE;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!This->buf.rem_bytes)
|
||||
{
|
||||
*ppDataObj = NULL;
|
||||
return DXFILEERR_NOMOREOBJECTS;
|
||||
}
|
||||
|
||||
hr = IDirectXFileDataImpl_Create(&object);
|
||||
if (FAILED(hr))
|
||||
|
|
Loading…
Reference in a new issue