diff --git a/reactos/subsystems/win32/win32k/objects/bitmaps.c b/reactos/subsystems/win32/win32k/objects/bitmaps.c index 4ae2c8987bb..5d0947f28cc 100644 --- a/reactos/subsystems/win32/win32k/objects/bitmaps.c +++ b/reactos/subsystems/win32/win32k/objects/bitmaps.c @@ -437,7 +437,12 @@ IntCreateBitmapIndirect(CONST BITMAP *BM) Size.cx, Size.cy, BitsPixel, hBitmap); bmp = BITMAPOBJ_LockBitmap( hBitmap ); - /* FIXME - bmp can be NULL!!!!!! */ + if (bmp == NULL) + { + /* FIXME should we free the hBitmap or return it ?? */ + return 0; + } + bmp->flFlags = BITMAPOBJ_IS_APIBITMAP; BITMAPOBJ_UnlockBitmap( bmp );