Ignore empty rectangles in ExtCreateRegion.

This commit is contained in:
Alexandre Julliard 2004-06-29 03:44:30 +00:00
parent e95136b7e3
commit 8ac61c5a1e
1 changed files with 4 additions and 1 deletions

View File

@ -1018,7 +1018,10 @@ HRGN WINAPI ExtCreateRegion( const XFORM* lpXform, DWORD dwCount, const RGNDATA*
if (obj) {
pEndRect = (RECT *)rgndata->Buffer + rgndata->rdh.nCount;
for(pCurRect = (RECT *)rgndata->Buffer; pCurRect < pEndRect; pCurRect++)
REGION_UnionRectWithRegion( pCurRect, obj->rgn );
{
if (pCurRect->left < pCurRect->right && pCurRect->top < pCurRect->bottom)
REGION_UnionRectWithRegion( pCurRect, obj->rgn );
}
GDI_ReleaseObj( hrgn );
TRACE("%p\n", hrgn );