X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f29d3d6133310ab9d46bbb51bbd4f269210c7b35..77fb1a02aac56528bbf3229af32634cc02795906:/src/cocoa/evtloop.mm?ds=sidebyside diff --git a/src/cocoa/evtloop.mm b/src/cocoa/evtloop.mm index 7e122cb12a..4a3a94be67 100644 --- a/src/cocoa/evtloop.mm +++ b/src/cocoa/evtloop.mm @@ -60,8 +60,7 @@ int wxEventLoop::Run() // event loops are not recursive, you need to create another loop! wxCHECK_MSG( !IsRunning(), -1, _T("can't reenter a message loop") ); - wxEventLoop *oldLoop = ms_activeLoop; - ms_activeLoop = this; + wxEventLoopActivator activate(this); m_impl = new wxEventLoopImpl; @@ -71,8 +70,6 @@ int wxEventLoop::Run() delete m_impl; m_impl = NULL; - ms_activeLoop = oldLoop; - return exitcode; }