don't try to dereference NULL pointers

now Avira AntiVir installs without crashing the whole system

svn path=/trunk/; revision=34300
This commit is contained in:
Christoph von Wittich 2008-07-05 09:19:56 +00:00
parent 138bd07f65
commit 4409400b6b
2 changed files with 5 additions and 0 deletions

View file

@ -1550,6 +1550,8 @@ co_IntDoSendMessage(HWND hWnd,
MmCopyToCaller(UnsafeInfo, &Info, sizeof(NTUSERSENDMESSAGEINFO)); MmCopyToCaller(UnsafeInfo, &Info, sizeof(NTUSERSENDMESSAGEINFO));
return 0; return 0;
} }
if (!Window->Wnd)
return 0;
} }
/* FIXME: Check for an exiting window. */ /* FIXME: Check for an exiting window. */

View file

@ -899,6 +899,9 @@ NtUserMonitorFromWindow(
RETURN(hMonitor); RETURN(hMonitor);
} }
if (!Window->Wnd)
RETURN(hMonitor);
Rect.left = Rect.right = Window->Wnd->WindowRect.left; Rect.left = Rect.right = Window->Wnd->WindowRect.left;
Rect.top = Rect.bottom = Window->Wnd->WindowRect.bottom; Rect.top = Rect.bottom = Window->Wnd->WindowRect.bottom;