]> git.saurik.com Git - wxWidgets.git/commitdiff
don't assume there's always an active wxEventLoop instance
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 25 Jan 2007 17:33:09 +0000 (17:33 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 25 Jan 2007 17:33:09 +0000 (17:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/dfb/app.cpp

index e84aa6ae98be5450a4568ba7b075fa600f36e5f2..2cac31028be7194d4b18dab6b947e248b8d87038 100644 (file)
@@ -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