From 9e939c11e91e18d2d3d758d669ca93e52023d29c Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Thu, 28 Sep 2006 18:32:09 +0000 Subject: [PATCH] fix a hidden bug in IntCreateBitmapIndirect svn path=/trunk/; revision=24287 --- reactos/subsystems/win32/win32k/objects/bitmaps.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 );