From 655c20fcd5a554a986b93651d8b0bec2afde8573 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 25 Jan 2007 17:33:09 +0000 Subject: [PATCH] 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 --- src/dfb/app.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/dfb/app.cpp b/src/dfb/app.cpp index e84aa6a..2cac310 100644 --- a/src/dfb/app.cpp +++ b/src/dfb/app.cpp @@ -105,7 +105,9 @@ void wxApp::WakeUpIdle() wxMutexGuiEnter(); #endif - wxEventLoop::GetActive()->WakeUp(); + wxEventLoop * const loop = wxEventLoop::GetActive(); + if ( loop ) + loop->WakeUp(); #if wxUSE_THREADS if (!wxThread::IsMain()) @@ -137,8 +139,9 @@ bool wxApp::Yield(bool onlyIfNeeded) wxLog::Suspend(); - if ( wxEventLoop::GetActive() ) - wxEventLoop::GetActive()->Yield(); + wxEventLoop * const loop = wxEventLoop::GetActive(); + if ( loop ) + loop->Yield(); // it's necessary to call ProcessIdle() to update the frames sizes which // might have been changed (it also will update other things set from -- 2.7.4