Ensure that an event loop exists in ShowViewOrWindowWithEffect().
We may not have an event loop yet if wxWindow::ShowWithEffect() is called during the application startup, create a temporary event loop instead of crashing in this case. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1395,9 +1395,12 @@ wxWidgetCocoaImpl::ShowViewOrWindowWithEffect(wxWindow *win,
|
|||||||
//
|
//
|
||||||
// notice that because the default animation mode is NSAnimationBlocking,
|
// notice that because the default animation mode is NSAnimationBlocking,
|
||||||
// no user input events ought to be processed from here
|
// no user input events ought to be processed from here
|
||||||
|
{
|
||||||
|
wxEventLoopGuarantor ensureEventLoopExistence;
|
||||||
wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
|
wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
|
||||||
while ( ![animDelegate isDone] )
|
while ( ![animDelegate isDone] )
|
||||||
loop->Dispatch();
|
loop->Dispatch();
|
||||||
|
}
|
||||||
|
|
||||||
if ( !show )
|
if ( !show )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user