diff --git a/reactos/subsystems/win32/win32k/objects/text.c b/reactos/subsystems/win32/win32k/objects/text.c index a5ba4e6a26d..3e94ce25b49 100644 --- a/reactos/subsystems/win32/win32k/objects/text.c +++ b/reactos/subsystems/win32/win32k/objects/text.c @@ -2085,7 +2085,8 @@ fail: EngDeleteXlate(XlateObj); if(TextObj != NULL) TEXTOBJ_UnlockText(TextObj); - BITMAPOBJ_UnlockBitmap(BitmapObj); + if (BitmapObj != NULL) + BITMAPOBJ_UnlockBitmap(BitmapObj); if (hBrushBg != NULL) { BRUSHOBJ_UnlockBrush(BrushBg);