[Win32k]
authorJames Tabor <james.tabor@reactos.org>
Fri, 8 Nov 2013 00:26:08 +0000 (00:26 +0000)
committerJames Tabor <james.tabor@reactos.org>
Fri, 8 Nov 2013 00:26:08 +0000 (00:26 +0000)
- Attempt to fix CORE-7554.

svn path=/trunk/; revision=60881

reactos/win32ss/user/ntuser/vis.c
reactos/win32ss/user/ntuser/windc.c

index 1f0b7dc..522e763 100644 (file)
@@ -45,10 +45,9 @@ VIS_ComputeVisibleRegion(
    CurrentWindow = Wnd->spwndParent;
    while (CurrentWindow)
    {
-      if ( CurrentWindow->state2 & WNDS2_INDESTROY ||
-           CurrentWindow->state & WNDS_DESTROYED )
+      if (!VerifyWnd(CurrentWindow))
       {
-         ERR("ATM the Current Window or Parent is dead!\n");
+         ERR("ATM the Current Window or Parent is dead! %p\n",CurrentWindow);
          if (VisRgn) GreDeleteObject(VisRgn);
          return NULL;
       }
index e81b61e..4e697df 100644 (file)
@@ -245,7 +245,7 @@ noparent:
    Dce->DCXFlags &= ~DCX_DCEDIRTY;
    GdiSelectVisRgn(Dce->hDC, hRgnVisible);
 
-   if (Window != NULL)
+   if (VerifyWnd(Window)) // Window maybe dead by this time before finishing the DCE release.
    {
       IntEngWindowChanged(Window, WOC_RGN_CLIENT);
    }