Author: jimtabor
Date: Sat Jan 29 09:09:10 2011
New Revision: 50548

URL: http://svn.reactos.org/svn/reactos?rev=50548&view=rev
Log:
[Win32k]
- Fix crash with standalone win test_hind_message test.

Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/painting.c

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/painting.c?rev=50548&r1=50547&r2=50548&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] 
(original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] Sat 
Jan 29 09:09:10 2011
@@ -692,13 +692,18 @@
 {
    PDESKTOP Desktop;
    PTHRDCARETINFO CaretInfo;
+   PTHREADINFO pti;
+   PUSER_MESSAGE_QUEUE ActiveMessageQueue;
    HWND hWndCaret;
    PWND WndCaret;
 
    ASSERT_REFS_CO(Window);
 
-   Desktop = ((PTHREADINFO)PsGetCurrentThread()->Tcb.Win32Thread)->rpdesk;
-   CaretInfo = ((PUSER_MESSAGE_QUEUE)Desktop->ActiveMessageQueue)->CaretInfo;
+   pti = PsGetCurrentThreadWin32Thread();
+   Desktop = pti->rpdesk;
+   ActiveMessageQueue = Desktop->ActiveMessageQueue;
+   if (!ActiveMessageQueue) return 0;
+   CaretInfo = ActiveMessageQueue->CaretInfo;
    hWndCaret = CaretInfo->hWnd;
 
    WndCaret = UserGetWindowObject(hWndCaret);


Reply via email to