don't try to free a NULL object.
authorGed Murphy <gedmurphy@reactos.org>
Wed, 9 Jul 2008 14:20:08 +0000 (14:20 +0000)
committerGed Murphy <gedmurphy@reactos.org>
Wed, 9 Jul 2008 14:20:08 +0000 (14:20 +0000)
patch by hto (hto at dev dot null)
See issue #3486 for more details.

svn path=/trunk/; revision=34393

reactos/subsystems/win32/win32k/objects/text.c

index a5ba4e6..3e94ce2 100644 (file)
@@ -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);