[Win32k]
authorJames Tabor <james.tabor@reactos.org>
Sat, 6 Sep 2014 17:47:45 +0000 (17:47 +0000)
committerJames Tabor <james.tabor@reactos.org>
Sat, 6 Sep 2014 17:47:45 +0000 (17:47 +0000)
- Apply band-aid patch from CORE-8506. Problem still persists, how did a bad region get plugged into the DCE structure?

svn path=/trunk/; revision=64054

reactos/win32ss/user/ntuser/windc.c

index 0e71267..425b971 100644 (file)
@@ -215,7 +215,7 @@ DceUpdateVisRgn(DCE *Dce, PWND Window, ULONG Flags)
       PWND Parent;
 
       Parent = Window->spwndParent;
-      if(!Parent)
+      if (!Parent)
       {
          RgnVisible = NULL;
          goto noparent;
@@ -252,15 +252,19 @@ DceUpdateVisRgn(DCE *Dce, PWND Window, ULONG Flags)
 noparent:
    if (Flags & DCX_INTERSECTRGN)
    {
-      if(Dce->hrgnClip != NULL)
+      PREGION RgnClip = NULL;
+
+      if (Dce->hrgnClip != NULL)
+          RgnClip = REGION_LockRgn(Dce->hrgnClip);
+      
+      if (RgnClip)
       {
-         PREGION RgnClip = REGION_LockRgn(Dce->hrgnClip);
          IntGdiCombineRgn(RgnVisible, RgnVisible, RgnClip, RGN_AND);
          REGION_UnlockRgn(RgnClip);
       }
       else
       {
-         if(RgnVisible != NULL)
+         if (RgnVisible != NULL)
          {
             REGION_Delete(RgnVisible);
          }