From 622c01c5e1fb72bf4ddcc78ea90bc36ff7d540ae Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Fri, 8 Jul 2016 15:57:36 +0100 Subject: [PATCH] gdi32: Add back the extents test. Spotted by Sebastian Lackner. Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/gdi32/region.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/gdi32/region.c b/dlls/gdi32/region.c index cea2dabc505..db21c02581a 100644 --- a/dlls/gdi32/region.c +++ b/dlls/gdi32/region.c @@ -1038,7 +1038,8 @@ BOOL WINAPI PtInRegion( HRGN hrgn, INT x, INT y ) if ((obj = GDI_GetObjPtr( hrgn, OBJ_REGION ))) { - region_find_pt( obj, x, y, &ret ); + if (obj->numRects > 0 && is_in_rect( &obj->extents, x, y )) + region_find_pt( obj, x, y, &ret ); GDI_ReleaseObj( hrgn ); } return ret; -- 2.11.4.GIT