From b67bbb732be82dedee93c88cf92c92c0540f3514 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Sun, 20 Sep 2020 15:58:54 +0200 Subject: [PATCH] server: Don't create wait object if infinite timeout is passed to NtSetTimer. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49847 Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- server/timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/timer.c b/server/timer.c index 6460acbf519..469f9d5a90b 100644 --- a/server/timer.c +++ b/server/timer.c @@ -177,7 +177,8 @@ static int set_timer( struct timer *timer, timeout_t expire, unsigned int period timer->callback = callback; timer->arg = arg; if (callback) timer->thread = (struct thread *)grab_object( current ); - timer->timeout = add_timeout_user( expire, timer_callback, timer ); + if (expire != TIMEOUT_INFINITE) + timer->timeout = add_timeout_user( expire, timer_callback, timer ); return signaled; }