- 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'

svn path=/trunk/; revision=47070
This commit is contained in:
Johannes Anderwald 2010-05-01 10:42:45 +00:00
parent a0790104cc
commit 06ef98d273

View file

@ -279,7 +279,9 @@ PostTimerMessages(PWINDOW_OBJECT Window)
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 @@ PostTimerMessages(PWINDOW_OBJECT Window)
(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;