X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d644707ca96dcaa63dc5a24c9eb5c2b7ee0b50d..e50d5284f9b468609e4b55b69329a6e83a1d0c8e:/src/os2/timer.cpp diff --git a/src/os2/timer.cpp b/src/os2/timer.cpp index bb897e1f78..f102ace512 100644 --- a/src/os2/timer.cpp +++ b/src/os2/timer.cpp @@ -9,6 +9,10 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#ifdef __GNUG__ + #pragma implementation "timer.h" +#endif + // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -51,8 +55,8 @@ void wxTimer::Init() wxTimer::~wxTimer() { - Stop(); wxTimer::Stop(); + wxTimerList.DeleteObject(this); } @@ -164,8 +168,8 @@ ULONG wxTimerProc( 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->Data()); return 0; }