https://git.reactos.org/?p=reactos.git;a=commitdiff;h=456e2192b7c9be77359ed5ad2b56f2f80a11ad0d

commit 456e2192b7c9be77359ed5ad2b56f2f80a11ad0d
Author: Timo Kreuzer <timo.kreu...@reactos.org>
AuthorDate: Wed Dec 27 10:48:55 2017 +0100

    [WIN32K] Check for empty output rect in GreGradientFill
    Fixes a failed ASSERT.
    CORE-14148 #resolve
---
 win32ss/gdi/ntgdi/fillshap.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/win32ss/gdi/ntgdi/fillshap.c b/win32ss/gdi/ntgdi/fillshap.c
index f3663a6eda..a42a341423 100644
--- a/win32ss/gdi/ntgdi/fillshap.c
+++ b/win32ss/gdi/ntgdi/fillshap.c
@@ -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);
 

Reply via email to