diff --git a/reactos/win32ss/gdi/ntgdi/bitmaps.c b/reactos/win32ss/gdi/ntgdi/bitmaps.c index e72dec295e7..2ded5a86e34 100644 --- a/reactos/win32ss/gdi/ntgdi/bitmaps.c +++ b/reactos/win32ss/gdi/ntgdi/bitmaps.c @@ -239,6 +239,12 @@ IntCreateCompatibleBitmap( Planes ? Planes : 1, Bpp ? Bpp : Dc->ppdev->gdiinfo.cBitsPixel, NULL); + if (Bmp == NULL) + { + DPRINT1("Failed to allocate a bitmap!\n"); + return NULL; + } + psurf = SURFACE_ShareLockSurface(Bmp); ASSERT(psurf);