Henri Verbeet : wined3d: Don't touch "ppSurface" on failure in IWineD3DDeviceImpl_CreateSurface().

Alexandre Julliard julliard at winehq.org
Fri Dec 18 10:49:06 CST 2009


Module: wine
Branch: master
Commit: 7fe3ab5a234893084724f2cd76885f8cffb3ba40
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7fe3ab5a234893084724f2cd76885f8cffb3ba40

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Dec 17 19:14:33 2009 +0100

wined3d: Don't touch "ppSurface" on failure in IWineD3DDeviceImpl_CreateSurface().

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




More information about the wine-cvs mailing list