diff --git a/reactos/subsystems/win32/win32k/ntuser/message.c b/reactos/subsystems/win32/win32k/ntuser/message.c index 7bee1f37f32..0dcf17b8b02 100644 --- a/reactos/subsystems/win32/win32k/ntuser/message.c +++ b/reactos/subsystems/win32/win32k/ntuser/message.c @@ -1550,6 +1550,8 @@ co_IntDoSendMessage(HWND hWnd, MmCopyToCaller(UnsafeInfo, &Info, sizeof(NTUSERSENDMESSAGEINFO)); return 0; } + if (!Window->Wnd) + return 0; } /* FIXME: Check for an exiting window. */ diff --git a/reactos/subsystems/win32/win32k/ntuser/monitor.c b/reactos/subsystems/win32/win32k/ntuser/monitor.c index a3e2121ffb5..d93047b966d 100644 --- a/reactos/subsystems/win32/win32k/ntuser/monitor.c +++ b/reactos/subsystems/win32/win32k/ntuser/monitor.c @@ -899,6 +899,9 @@ NtUserMonitorFromWindow( RETURN(hMonitor); } + if (!Window->Wnd) + RETURN(hMonitor); + Rect.left = Rect.right = Window->Wnd->WindowRect.left; Rect.top = Rect.bottom = Window->Wnd->WindowRect.bottom;