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 <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-09-20 15:58:54 +02:00 committed by Alexandre Julliard
parent 123a4a884f
commit b67bbb732b
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}