X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e819ca3aa5a6da0944180d0da45102457bffcff5..263e3a8327f544990c7ba7edb8cd34994c908049:/src/common/appbase.cpp?ds=sidebyside diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 34dbcf0089..194d0793ac 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -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 tmpLoop(CreateMainLoop()); + return tmpLoop->Yield(onlyIfNeeded); } void wxAppConsoleBase::WakeUpIdle()