From a3370efc0a1f8632e99bd3d1b56d98496be4571e Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Sat, 28 Aug 2010 23:55:27 +0000 Subject: [PATCH] [win32k] - Mouse messages can be sent before the desktop is initialized. Check for this and return false if its not. FIxes assert when moving mouse before desktop is up. svn path=/trunk/; revision=48636 --- reactos/subsystems/win32/win32k/ntuser/msgqueue.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reactos/subsystems/win32/win32k/ntuser/msgqueue.c b/reactos/subsystems/win32/win32k/ntuser/msgqueue.c index dc315b5ccaf..b7cba1d7dd0 100644 --- a/reactos/subsystems/win32/win32k/ntuser/msgqueue.c +++ b/reactos/subsystems/win32/win32k/ntuser/msgqueue.c @@ -350,6 +350,10 @@ co_MsqTranslateMouseMessage(PUSER_MESSAGE_QUEUE MessageQueue, PWINDOW_OBJECT Win PWINDOW_OBJECT CaptureWindow = NULL; HWND hCaptureWin; + /* FIXME: Mouse message can be sent before the Desktop is up and running in which case ScopeWin (Desktop) is 0. + Is this the best fix? */ + if (ScopeWin == 0) return FALSE; + ASSERT_REFS_CO(ScopeWin); /*