]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
Read TIFF images from top to bottom instead of bottom to top.
[wxWidgets.git] / src / common / appbase.cpp
index 34dbcf00895d548fba98903aa2485eeac7b08381..194d0793acf80d32df46492c2bd49899f04e35e0 100644 (file)
@@ -345,8 +345,11 @@ bool wxAppConsoleBase::Dispatch()
 bool wxAppConsoleBase::Yield(bool onlyIfNeeded)
 {
     wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
+    if ( loop )
+       return loop->Yield(onlyIfNeeded);
 
-    return loop && loop->Yield(onlyIfNeeded);
+    wxScopedPtr<wxEventLoopBase> tmpLoop(CreateMainLoop());
+    return tmpLoop->Yield(onlyIfNeeded);
 }
 
 void wxAppConsoleBase::WakeUpIdle()