Revision: 7266
http://svn.sourceforge.net/mahogany/?rev=7266&view=rev
Author: vadz
Date: 2007-05-05 15:23:16 -0700 (Sat, 05 May 2007)
Log Message:
-----------
recently added code to filter timer events when M was busy could crash because the event object of timer event isn't always a timer; fix this by using the newly added wxTimerEvent::GetTimer() instead
Modified Paths:
--------------
trunk/M/src/gui/wxMApp.cpp
Modified: trunk/M/src/gui/wxMApp.cpp
===================================================================
--- trunk/M/src/gui/wxMApp.cpp 2007-05-02 15:32:08 UTC (rev 7265)
+++ trunk/M/src/gui/wxMApp.cpp 2007-05-05 22:23:16 UTC (rev 7266)
@@ -625,18 +625,21 @@
return false;
}
+ // GetTimer() is new
+#if wxCHECK_VERSION(2, 9, 0)
if ( event.GetEventType() == wxEVT_TIMER )
{
// this one should also be ignored right now as we could call to c-client
// from its handler too, but there is an added complication: if it was a
// one shot timer event, we need to restart the timer to avoid losing the
// event entirely
- wxTimer * const timer = wx_static_cast(wxTimer *, event.GetEventObject());
- if ( timer && timer->IsOneShot() )
- timer->Start(-1 /* same interval as last time */, true /* one shot */);
+ wxTimer& timer = wx_static_cast(wxTimerEvent&, event).GetTimer();
+ if ( timer.IsOneShot() )
+ timer.Start(-1 /* same interval as last time */, true /* one shot */);
return false;
}
+#endif // wx 2.9.0
// the other events should be safe to handle
return -1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.