[WIN32K]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 28 Nov 2015 15:48:57 +0000 (15:48 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 28 Nov 2015 15:48:57 +0000 (15:48 +0000)
Check for dc->dclevel.pSurface == NULL in IntGdiPolygon.
CORE-10377 #resolve

svn path=/trunk/; revision=70179

reactos/win32ss/gdi/ntgdi/fillshap.c

index db16f01..fa9c27a 100644 (file)
@@ -81,8 +81,11 @@ IntGdiPolygon(PDC    dc,
         pbrFill = dc->dclevel.pbrFill;
         pbrLine = dc->dclevel.pbrLine;
         psurf = dc->dclevel.pSurface;
-        /* FIXME: psurf can be NULL!!!! don't assert but handle this case gracefully! */
-        ASSERT(psurf);
+        if (psurf == NULL)
+        {
+            /* Memory DC without a bitmap selected, nothing to do. */
+            return TRUE;
+        }
 
         /* Now fill the polygon with the current fill brush. */
         if (!(pbrFill->flAttrs & BR_IS_NULL))