d3dxof: Make sure the returned object pointer is null when there are no more children.

This commit is contained in:
Christian Costa 2012-03-08 09:16:38 +01:00 committed by Alexandre Julliard
parent 2f75ed48ff
commit bf71205b48
1 changed files with 4 additions and 0 deletions

View File

@ -661,11 +661,15 @@ static HRESULT WINAPI IDirectXFileDataImpl_GetNextObject(IDirectXFileData* iface
TRACE("(%p/%p)->(%p)\n", This, iface, ppChildObj);
if (This->cur_enum_object >= This->pobj->nb_children)
{
*ppChildObj = NULL;
return DXFILEERR_NOMOREOBJECTS;
}
if (This->from_ref && (This->level >= 1))
{
/* Only 2 levels can be enumerated if the object is obtained from a reference */
*ppChildObj = NULL;
return DXFILEERR_NOMOREOBJECTS;
}