[PATCH 2/6] d3dxof: Make sure the returned object pointer is null when there is no more children.

Christian Costa titan.costa at gmail.com
Thu Mar 8 02:16:38 CST 2012


---
 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;
   }
 




More information about the wine-patches mailing list