[PATCH] initialize pSurface, since we process it on failure

Marcus Meissner marcus at jet.franken.de
Sat May 12 04:39:15 CDT 2007


Hi,

Not sure if we should perhaps not do the ICOM CAST magic on a failing
CreateSurface call here.

But initializing pSurface to NULL also helps.

Ciao, Marcus
---
 dlls/ddraw/ddraw_thunks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ddraw/ddraw_thunks.c b/dlls/ddraw/ddraw_thunks.c
index b748ad4..c9caa5a 100644
--- a/dlls/ddraw/ddraw_thunks.c
+++ b/dlls/ddraw/ddraw_thunks.c
@@ -382,7 +382,7 @@ IDirectDrawImpl_CreateSurface(LPDIRECTDR
 			      LPDIRECTDRAWSURFACE *ppSurface,
 			      IUnknown *pUnkOuter)
 {
-    LPDIRECTDRAWSURFACE7 pSurface7;
+    LPDIRECTDRAWSURFACE7 pSurface7 = NULL;
     IDirectDrawSurfaceImpl *impl;
     HRESULT hr;
 
-- 
1.4.3.4



More information about the wine-patches mailing list