[ros-diffs] [arty] 38886: Prevent a null access when the first show-desktop is called. Hidden by low-memory mapped in csrss.

arty at svn.reactos.org arty at svn.reactos.org
Sun Jan 18 13:11:33 CET 2009


Author: arty
Date: Sun Jan 18 06:11:32 2009
New Revision: 38886

URL: http://svn.reactos.org/svn/reactos?rev=38886&view=rev
Log:
Prevent a null access when the first show-desktop is called.  Hidden by low-memory mapped in csrss.

Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c?rev=38886&r1=38885&r2=38886&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] Sun Jan 18 06:11:32 2009
@@ -885,6 +885,7 @@
    HDC Dc;
    RECT CopyRect;
    RECT TempRect;
+   PWINDOW_OBJECT Ancestor;
 
    ASSERT_REFS_CO(Window);
 
@@ -923,11 +924,10 @@
       return FALSE;
    }
 
+   Ancestor = UserGetAncestor(Window, GA_PARENT);
    if ((WinPos.flags & (SWP_NOZORDER | SWP_HIDEWINDOW | SWP_SHOWWINDOW)) !=
          SWP_NOZORDER &&
-//         UserGetAncestor(WinPos.hwnd, GA_PARENT) == IntGetDesktopWindow())
-//faxme: is WinPos.hwnd constant?? (WinPos.hwnd = Window->hSelf above)
-         UserGetAncestor(Window, GA_PARENT)->hSelf == IntGetDesktopWindow())
+         Ancestor && Ancestor->hSelf == IntGetDesktopWindow())
    {
       WinPos.hwndInsertAfter = WinPosDoOwnedPopups(WinPos.hwnd, WinPos.hwndInsertAfter);
    }



More information about the Ros-diffs mailing list