Andrew Talbot : ddraw: Fix double unlock of critical section.

Alexandre Julliard julliard at winehq.org
Sat Jan 10 11:16:34 CST 2009


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

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Fri Jan  9 22:09:07 2009 +0000

ddraw: Fix double unlock of critical section.

---

 dlls/ddraw/surface.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index f184111..b0b7437 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -2333,14 +2333,15 @@ IDirectDrawSurfaceImpl_SetSurfaceDesc(IDirectDrawSurface7 *iface,
         if(hr != WINED3D_OK)
         {
             /* No need for a trace here, wined3d does that for us */
-            LeaveCriticalSection(&ddraw_cs);
             switch(hr)
             {
-                case WINED3DERR_INVALIDCALL:        return DDERR_INVALIDPARAMS;
-                default:                            break; /* Go on */
+                case WINED3DERR_INVALIDCALL:
+                    LeaveCriticalSection(&ddraw_cs);
+                    return DDERR_INVALIDPARAMS;
+                default:
+                    break; /* Go on */
             }
         }
-
     }
 
     This->surface_desc = *DDSD;




More information about the wine-cvs mailing list