Check that GetObject is successful.

This commit is contained in:
Mike McCormack 2005-05-11 12:02:16 +00:00 committed by Alexandre Julliard
parent fb7dbb627e
commit e6d4bcd7ae
1 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,8 @@ static BOOL EMFDRV_BitBlockTransfer(
else else
return FALSE; return FALSE;
GetObjectW(hBitmap, sizeof(BITMAP), &BM); if(sizeof(BITMAP) != GetObjectW(hBitmap, sizeof(BITMAP), &BM))
return FALSE;
nBPP = BM.bmPlanes * BM.bmBitsPixel; nBPP = BM.bmPlanes * BM.bmBitsPixel;
if(nBPP > 8) nBPP = 24; /* FIXME Can't get 16bpp to work for some reason */ if(nBPP > 8) nBPP = 24; /* FIXME Can't get 16bpp to work for some reason */