GDI32: check GetObject is successful
Mike McCormack
mike at codeweavers.com
Wed May 11 03:15:04 CDT 2005
ChangeLog:
* check GetObject is successful
-------------- next part --------------
Index: dlls/gdi/enhmfdrv/bitblt.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/enhmfdrv/bitblt.c,v
retrieving revision 1.6
diff -u -p -r1.6 bitblt.c
--- dlls/gdi/enhmfdrv/bitblt.c 11 Mar 2004 00:37:46 -0000 1.6
+++ dlls/gdi/enhmfdrv/bitblt.c 11 May 2005 08:15:34 -0000
@@ -94,7 +94,8 @@ static BOOL EMFDRV_BitBlockTransfer(
else
return FALSE;
- GetObjectW(hBitmap, sizeof(BITMAP), &BM);
+ if(sizeof(BITMAP) != GetObjectW(hBitmap, sizeof(BITMAP), &BM))
+ return FALSE;
nBPP = BM.bmPlanes * BM.bmBitsPixel;
if(nBPP > 8) nBPP = 24; /* FIXME Can't get 16bpp to work for some reason */
More information about the wine-patches
mailing list