[PATCH 2/5] wined3d: Don't touch "ppSurface" on failure in IWineD3DDeviceImpl_CreateSurface().

Henri Verbeet hverbeet at codeweavers.com
Thu Dec 17 12:14:33 CST 2009


I originally kept these when adding surface_init() in
5f581975dcf83f4f32432137990c72c26b415e3b because the original code had them on
most error paths. However, this actually broke ddraw because it assumed we
don't touch "ppSurface" on errors. Just remove these since they're useless
anyway.
---
 dlls/wined3d/device.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index bedccb0..d09655d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -640,7 +640,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UI
     if (!object)
     {
         ERR("Failed to allocate surface memory.\n");
-        *ppSurface = NULL;
         return WINED3DERR_OUTOFVIDEOMEMORY;
     }
 
@@ -650,7 +649,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UI
     {
         WARN("Failed to initialize surface, returning %#x.\n", hr);
         HeapFree(GetProcessHeap(), 0, object);
-        *ppSurface = NULL;
         return hr;
     }
 
-- 
1.6.4.4




More information about the wine-patches mailing list