diff --git a/src/osx/cocoa/evtloop.mm b/src/osx/cocoa/evtloop.mm index f0a0425e07..1443da86bc 100644 --- src/osx/cocoa/evtloop.mm +++ src/osx/cocoa/evtloop.mm @@ -517,7 +517,9 @@ void wxGUIEventLoop::EndModalSession() wxASSERT_MSG(m_modalSession != NULL, "no modal session active"); wxASSERT_MSG(m_modalNestedLevel > 0, "incorrect modal nesting level"); - + + m_modalWindow = NULL; + --m_modalNestedLevel; if ( m_modalNestedLevel == 0 ) {