Commit bf71205b authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

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

parent 2f75ed48
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment