mirror of
https://github.com/reactos/reactos.git
synced 2025-05-22 02:25:18 +00:00
[WIN32K] Add some NULL checks for THREADINFO::rpdesk
rpdesk should probably never be NULL, but it happens in rare circumstances, like csrss being terminated.
This commit is contained in:
parent
e56da4854f
commit
abb75b6214
3 changed files with 11 additions and 3 deletions
|
@ -1788,6 +1788,14 @@ BOOL IntDeRegisterShellHookWindow(HWND hWnd)
|
||||||
PLIST_ENTRY ListEntry;
|
PLIST_ENTRY ListEntry;
|
||||||
PSHELL_HOOK_WINDOW Current;
|
PSHELL_HOOK_WINDOW Current;
|
||||||
|
|
||||||
|
// FIXME: This probably shouldn't happen, but it does
|
||||||
|
if (Desktop == NULL)
|
||||||
|
{
|
||||||
|
Desktop = IntGetActiveDesktop();
|
||||||
|
if (Desktop == NULL)
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
ListEntry = Desktop->ShellHookWindows.Flink;
|
ListEntry = Desktop->ShellHookWindows.Flink;
|
||||||
while (ListEntry != &Desktop->ShellHookWindows)
|
while (ListEntry != &Desktop->ShellHookWindows)
|
||||||
{
|
{
|
||||||
|
|
|
@ -493,7 +493,7 @@ static void IntSendDestroyMsg(HWND hWnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the window being destroyed is currently tracked... */
|
/* If the window being destroyed is currently tracked... */
|
||||||
if (ti->rpdesk->spwndTrack == Window)
|
if (ti->rpdesk && ti->rpdesk->spwndTrack == Window)
|
||||||
{
|
{
|
||||||
IntRemoveTrackMouseEvent(ti->rpdesk);
|
IntRemoveTrackMouseEvent(ti->rpdesk);
|
||||||
}
|
}
|
||||||
|
|
|
@ -436,12 +436,12 @@ co_WinPosActivateOtherWindow(PWND Wnd)
|
||||||
|
|
||||||
// Find any window to bring to top. Works Okay for wine since it does not see X11 windows.
|
// Find any window to bring to top. Works Okay for wine since it does not see X11 windows.
|
||||||
WndTo = UserGetDesktopWindow();
|
WndTo = UserGetDesktopWindow();
|
||||||
WndTo = WndTo->spwndChild;
|
if ((WndTo == NULL) || (WndTo->spwndChild == NULL))
|
||||||
if ( WndTo == NULL )
|
|
||||||
{
|
{
|
||||||
//ERR("WinPosActivateOtherWindow No window!\n");
|
//ERR("WinPosActivateOtherWindow No window!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
WndTo = WndTo->spwndChild;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (WndTo == Wnd)
|
if (WndTo == Wnd)
|
||||||
|
|
Loading…
Reference in a new issue