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/ntu... ============================================================================== --- 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); }