From d87a241b2528839b5fcea97f4f7e9631eea08bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Wed, 17 Sep 2014 12:01:34 +0000 Subject: [PATCH] [WIN32K] - Return empty region in DceGetVisRgn if there is nothing to return. svn path=/trunk/; revision=64179 --- reactos/win32ss/user/ntuser/windc.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/reactos/win32ss/user/ntuser/windc.c b/reactos/win32ss/user/ntuser/windc.c index 1307d077c49..85daa274b88 100644 --- a/reactos/win32ss/user/ntuser/windc.c +++ b/reactos/win32ss/user/ntuser/windc.c @@ -69,10 +69,15 @@ static PREGION FASTCALL DceGetVisRgn(PWND Window, ULONG Flags, HWND hWndChild, ULONG CFlags) { - return VIS_ComputeVisibleRegion( Window, - 0 == (Flags & DCX_WINDOW), - 0 != (Flags & DCX_CLIPCHILDREN), - 0 != (Flags & DCX_CLIPSIBLINGS)); + PREGION Rgn; + Rgn = VIS_ComputeVisibleRegion( Window, + 0 == (Flags & DCX_WINDOW), + 0 != (Flags & DCX_CLIPCHILDREN), + 0 != (Flags & DCX_CLIPSIBLINGS)); + /* Caller expects a non-null region */ + if (!Rgn) + Rgn = IntSysCreateRectpRgn(0, 0, 0, 0); + return Rgn; } PDCE FASTCALL