Author: janderwald
Date: Sat May 1 12:42:45 2010
New Revision: 47070
URL:
http://svn.reactos.org/svn/reactos?rev=47070&view=rev
Log:
[WIN32K]
- Add an assert to PostTimerMessages to catch null pointer windows
- Add another assert to catch special windows (Window == 1)
- Improve check if the window is '1'
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/timer.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/timer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/timer.c [iso-8859-1] Sat May 1 12:42:45
2010
@@ -279,7 +279,9 @@
if (!pTmr) return FALSE;
- if (Window && (int)Window != 1)
+ ASSERT(Window);
+
+ if (Window && ((ULONG_PTR)Window != 1))
{
if (!Window->Wnd) return FALSE;
}
@@ -294,6 +296,7 @@
(pTmr->pti == pti) &&
(pTmr->pWnd == Window))
{
+ ASSERT((ULONG_PTR)Window != 1);
Msg.hwnd = Window->hSelf;
Msg.message = (pTmr->flags & TMRF_SYSTEM) ? WM_SYSTIMER : WM_TIMER;
Msg.wParam = (WPARAM) pTmr->nID;