Author: jimtabor
Date: Mon Aug 6 03:25:29 2012
New Revision: 57046
URL:
http://svn.reactos.org/svn/reactos?rev=57046&view=rev
Log:
[NtUser] - Stop spurious window handle errors.
Modified:
trunk/reactos/win32ss/user/ntuser/timer.c
Modified: trunk/reactos/win32ss/user/ntuser/timer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/timer.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/timer.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/timer.c [iso-8859-1] Mon Aug 6 03:25:29 2012
@@ -619,12 +619,12 @@
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 @@
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));