- [Win32k] Test thread death before posting to queue.
authorJames Tabor <james.tabor@reactos.org>
Mon, 30 Nov 2009 20:13:05 +0000 (20:13 +0000)
committerJames Tabor <james.tabor@reactos.org>
Mon, 30 Nov 2009 20:13:05 +0000 (20:13 +0000)
svn path=/trunk/; revision=44334

reactos/subsystems/win32/win32k/ntuser/message.c

index c968192..c11c35b 100644 (file)
@@ -1324,7 +1324,7 @@ UserPostThreadMessage( DWORD idThread,
    if( Status == STATUS_SUCCESS )
    {
       pThread = (PTHREADINFO)peThread->Tcb.Win32Thread;
-      if( !pThread || !pThread->MessageQueue )
+      if( !pThread || !pThread->MessageQueue  || (pThread->TIF_flags & TIF_INCLEANUP))
       {
          ObDereferenceObject( peThread );
          return FALSE;