// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#ifdef __GNUG__
+ #pragma implementation "timer.h"
+#endif
+
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// macros
// ----------------------------------------------------------------------------
-IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
+IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxEvtHandler)
void wxTimer::Init()
{
wxTimer::~wxTimer()
{
- Stop();
wxTimer::Stop();
+
wxTimerList.DeleteObject(this);
}
wxNode* pNode = wxTimerList.Find((ULONG)nIdTimer);
wxCHECK_MSG(pNode, 0, wxT("bogus timer id in wxTimerProc") );
-
- wxProcessTimer(*(wxTimer *)pNode->Data());
+ if (pNode)
+ wxProcessTimer(*(wxTimer *)pNode->GetData());
return 0;
}