Fix CreateEnhMetaFile gdi lock

Huw D M Davies h.davies1 at physics.ox.ac.uk
Thu Sep 13 09:37:12 CDT 2001


	Huw D M Davies <hdavies at codeweavers.com>
	Release gdi lock before calling DeleteDC
-------------- next part --------------
Index: graphics/enhmetafiledrv/init.c
===================================================================
RCS file: /home/wine/wine/graphics/enhmetafiledrv/init.c,v
retrieving revision 1.26
diff -u -r1.26 init.c
--- graphics/enhmetafiledrv/init.c	2001/07/29 20:25:15	1.26
+++ graphics/enhmetafiledrv/init.c	2001/09/13 13:22:04
@@ -332,12 +332,13 @@
 	physDev->hFile = hFile;
     }
 
-    if( !hdc )
-      DeleteDC( hRefDC );
-	
     TRACE("returning %04x\n", dc->hSelf);
     ret = dc->hSelf;
     GDI_ReleaseObj( dc->hSelf );
+
+    if( !hdc )
+      DeleteDC( hRefDC );
+	
     return ret;
 }
 


More information about the wine-patches mailing list