From: Ivo Ivanov logos128@gmail.com
--- dlls/ntdll/threadpool.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c index 99525f831e1..0d88ebd34a0 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -2975,6 +2975,9 @@ VOID WINAPI TpSetTimer( TP_TIMER *timer, LARGE_INTEGER *timeout, LONG period, LO
TRACE( "%p %p %lu %lu\n", timer, timeout, period, window_length );
+ /* If the timer has any pending callbacks, cancel them first. */ + tp_object_cancel( this ); + RtlEnterCriticalSection( &timerqueue.cs );
assert( this->u.timer.timer_initialized );