Don't return NULL regions from DceGetVisRgn.
Modified: trunk/reactos/subsys/win32k/ntuser/windc.c

Modified: trunk/reactos/subsys/win32k/ntuser/windc.c
--- trunk/reactos/subsys/win32k/ntuser/windc.c	2005-09-20 09:31:13 UTC (rev 17944)
+++ trunk/reactos/subsys/win32k/ntuser/windc.c	2005-09-20 10:29:05 UTC (rev 17945)
@@ -63,6 +63,9 @@
                                      0 != (Flags & DCX_CLIPCHILDREN),
                                      0 != (Flags & DCX_CLIPSIBLINGS));
 
+   if (VisRgn == NULL)
+      VisRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
+
    return VisRgn;
 }
 
@@ -266,10 +269,6 @@
          DcxFlags = Flags & ~(DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | DCX_WINDOW);
       }
       hRgnVisible = DceGetVisRgn(Parent, DcxFlags, Window->hSelf, Flags);
-      if (hRgnVisible == NULL)
-      {
-         hRgnVisible = NtGdiCreateRectRgn(0, 0, 0, 0);
-      }
    }
    else if (Window == NULL)
    {