diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 6488703c09..26d42af3f6 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -1395,9 +1395,12 @@ wxWidgetCocoaImpl::ShowViewOrWindowWithEffect(wxWindow *win, // // notice that because the default animation mode is NSAnimationBlocking, // no user input events ought to be processed from here - wxEventLoopBase * const loop = wxEventLoopBase::GetActive(); - while ( ![animDelegate isDone] ) - loop->Dispatch(); + { + wxEventLoopGuarantor ensureEventLoopExistence; + wxEventLoopBase * const loop = wxEventLoopBase::GetActive(); + while ( ![animDelegate isDone] ) + loop->Dispatch(); + } if ( !show ) {