[NtGdi] Fix assert with Winamp
authorjimtabor <james.tabor@reactos.org>
Sun, 31 Mar 2019 18:31:59 +0000 (13:31 -0500)
committerjimtabor <james.tabor@reactos.org>
Sun, 31 Mar 2019 18:31:59 +0000 (13:31 -0500)
Fixes CORE-10774.

Reference:
Alexandre Julliard : Ignore empty rectangles in ExtCreateRegion.
https://source.winehq.org/git/wine.git/commitdiff/8ac61c5a1e56d0933de8af69dbb2a1640d13e05d

win32ss/gdi/ntgdi/region.c

index 13fae9e..7971218 100644 (file)
@@ -3858,7 +3858,10 @@ NtGdiExtCreateRegion(
         /* Insert the rectangles one by one */
         for(i=0; i<nCount; i++)
         {
-            REGION_UnionRectWithRgn(Region, &rects[i]);
+            if ( rects[i].left < rects[i].right && rects[i].top < rects[i].bottom )
+            {
+                REGION_UnionRectWithRgn(Region, &rects[i]);
+            }
         }
 
         if (Xform != NULL)