[win32k]
authorMichael Martin <michael.martin@reactos.org>
Sun, 27 Jun 2010 12:36:23 +0000 (12:36 +0000)
committerMichael Martin <michael.martin@reactos.org>
Sun, 27 Jun 2010 12:36:23 +0000 (12:36 +0000)
- Add Check for spwndNext being null before accessing any of the members. Fixes bugcheck when using cubicexplorer.

svn path=/trunk/; revision=47859

reactos/subsystems/win32/win32k/ntuser/winpos.c

index 8bdd299..cef431f 100644 (file)
@@ -961,7 +961,7 @@ WinPosFixupFlags(WINDOWPOS *WinPos, PWINDOW_OBJECT Window)
              * itself.
              */
             if ((WinPos->hwnd == WinPos->hwndInsertAfter) ||
-                (WinPos->hwnd == InsAfterWnd->spwndNext->hSelf))
+                ((InsAfterWnd->spwndNext) && (WinPos->hwnd == InsAfterWnd->spwndNext->hSelf)))
             {
                WinPos->flags |= SWP_NOZORDER;
             }
@@ -1006,10 +1006,10 @@ co_WinPosSetWindowPos(
    if (!Window->Wnd) return FALSE;
 
    /* FIXME: Get current active window from active queue. */
-
    /*
     * Only allow CSRSS to mess with the desktop window
     */
+
    if ( Window->hSelf == IntGetDesktopWindow() &&
         Window->pti->pEThread->ThreadsProcess != PsGetCurrentProcess())
    {