Check that GetObject is successful.
This commit is contained in:
parent
fb7dbb627e
commit
e6d4bcd7ae
|
@ -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 */
|
||||||
|
|
Loading…
Reference in New Issue