[WIN32K] Check for empty output rect in GreGradientFill
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 27 Dec 2017 09:48:55 +0000 (10:48 +0100)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 28 Dec 2017 09:46:01 +0000 (10:46 +0100)
Fixes a failed ASSERT.
CORE-14148 #resolve

win32ss/gdi/ntgdi/fillshap.c

index f3663a6..a42a341 100644 (file)
@@ -945,6 +945,12 @@ GreGradientFill(
     rclExtent.top    += pdc->ptlDCOrig.y;
     rclExtent.bottom += pdc->ptlDCOrig.y;
 
+    if (RECTL_bIsEmptyRect(&rclExtent))
+    {
+        DC_UnlockDc(pdc);
+        return TRUE;
+    }
+
     ptlDitherOrg.x = ptlDitherOrg.y = 0;
     IntLPtoDP(pdc, (LPPOINT)&ptlDitherOrg, 1);