merged 2.4 branch into the trunk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/intl.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/thread.h"
|
||||
#endif
|
||||
|
||||
#include "wx/timer.h"
|
||||
@@ -131,6 +132,13 @@ void wxTimerBase::Notify()
|
||||
|
||||
bool wxTimerBase::Start(int milliseconds, bool oneShot)
|
||||
{
|
||||
// under MSW timers only work when they're started from the main thread so
|
||||
// let the caller know about it
|
||||
#if wxUSE_THREADS
|
||||
wxASSERT_MSG( wxThread::IsMain(),
|
||||
_T("timer can only be started from the main thread") );
|
||||
#endif // wxUSE_THREADS
|
||||
|
||||
if ( IsRunning() )
|
||||
{
|
||||
// not stopping the already running timer might work for some
|
||||
|
||||
Reference in New Issue
Block a user