Author: mjmartin Date: Mon May 17 02:01:26 2010 New Revision: 47249
URL: http://svn.reactos.org/svn/reactos?rev=47249&view=rev Log: [win32k] - Check that the thread is not in cleanup before attempting to do anything related to it. Add a couple asserts for sanity.
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/timer.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/timer.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] Mon May 17 02:01:26 2010 @@ -368,7 +368,8 @@ { if (pTmr->cmsCountdown < 0) { - if (!(pTmr->flags & TMRF_READY)) + ASSERT(pTmr->pti); + if ((!(pTmr->flags & TMRF_READY)) && (!(pTmr->pti->TIF_flags & TIF_INCLEANUP))) { if (pTmr->flags & TMRF_ONESHOT) pTmr->flags |= TMRF_WAITING; @@ -384,8 +385,8 @@ // Set thread message queue for this timer. if (pTmr->pti->MessageQueue) { // Wakeup thread - if (pTmr->pti->MessageQueue->WakeMask & QS_POSTMESSAGE) - KeSetEvent(pTmr->pti->MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE); + ASSERT(pTmr->pti->MessageQueue->NewMessages != NULL); + KeSetEvent(pTmr->pti->MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE); } } }