Module: wine
Branch: master
Commit: bf71205b485ab512adeee603b40192e2bcacede2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bf71205b485ab512adeee603b…
Author: Christian Costa <titan.costa(a)gmail.com>
Date: Thu Mar 8 09:16:38 2012 +0100
d3dxof: Make sure the returned object pointer is null when there are no more children.
---
dlls/d3dxof/d3dxof.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c
index 7ce8208..3ba92e2 100644
--- a/dlls/d3dxof/d3dxof.c
+++ b/dlls/d3dxof/d3dxof.c
@@ -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;
}