From e6d4bcd7aed3d26f2c3bf8c88deec83bde8cbf64 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Wed, 11 May 2005 12:02:16 +0000 Subject: [PATCH] Check that GetObject is successful. --- dlls/gdi/enhmfdrv/bitblt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/gdi/enhmfdrv/bitblt.c b/dlls/gdi/enhmfdrv/bitblt.c index 18a58c58477..ad1d09171c8 100644 --- a/dlls/gdi/enhmfdrv/bitblt.c +++ b/dlls/gdi/enhmfdrv/bitblt.c @@ -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 */