don't assume there's always an active wxEventLoop instance
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -105,7 +105,9 @@ void wxApp::WakeUpIdle()
|
|||||||
wxMutexGuiEnter();
|
wxMutexGuiEnter();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxEventLoop::GetActive()->WakeUp();
|
wxEventLoop * const loop = wxEventLoop::GetActive();
|
||||||
|
if ( loop )
|
||||||
|
loop->WakeUp();
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
#if wxUSE_THREADS
|
||||||
if (!wxThread::IsMain())
|
if (!wxThread::IsMain())
|
||||||
@@ -137,8 +139,9 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
|||||||
|
|
||||||
wxLog::Suspend();
|
wxLog::Suspend();
|
||||||
|
|
||||||
if ( wxEventLoop::GetActive() )
|
wxEventLoop * const loop = wxEventLoop::GetActive();
|
||||||
wxEventLoop::GetActive()->Yield();
|
if ( loop )
|
||||||
|
loop->Yield();
|
||||||
|
|
||||||
// it's necessary to call ProcessIdle() to update the frames sizes which
|
// it's necessary to call ProcessIdle() to update the frames sizes which
|
||||||
// might have been changed (it also will update other things set from
|
// might have been changed (it also will update other things set from
|
||||||
|
Reference in New Issue
Block a user