From ab2b99cc4f3d5f26efb9e5174eec3bae2bd296dd Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 6 Aug 2012 03:25:29 +0000 Subject: [PATCH] [NtUser] - Stop spurious window handle errors. svn path=/trunk/; revision=57046 --- reactos/win32ss/user/ntuser/timer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/win32ss/user/ntuser/timer.c b/reactos/win32ss/user/ntuser/timer.c index 2172476d2d1..33ac0614b69 100644 --- a/reactos/win32ss/user/ntuser/timer.c +++ b/reactos/win32ss/user/ntuser/timer.c @@ -619,12 +619,12 @@ NtUserSetTimer TIMERPROC lpTimerFunc ) { - PWND Window; + PWND Window = NULL; DECLARE_RETURN(UINT_PTR); TRACE("Enter NtUserSetTimer\n"); UserEnterExclusive(); - Window = UserGetWindowObject(hWnd); + if (hWnd) Window = UserGetWindowObject(hWnd); UserLeave(); RETURN(IntSetTimer(Window, nIDEvent, uElapse, lpTimerFunc, TMRF_TIFROMWND)); @@ -644,12 +644,12 @@ NtUserKillTimer UINT_PTR uIDEvent ) { - PWND Window; + PWND Window = NULL; DECLARE_RETURN(BOOL); TRACE("Enter NtUserKillTimer\n"); UserEnterExclusive(); - Window = UserGetWindowObject(hWnd); + if (hWnd) Window = UserGetWindowObject(hWnd); UserLeave(); RETURN(IntKillTimer(Window, uIDEvent, FALSE));