X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e819ca3aa5a6da0944180d0da45102457bffcff5..7198c3368055d88249a338eb33b21f051f674806:/src/common/appbase.cpp 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()