Ensure that there is a modal event loop before trying to use it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-11-08 17:40:28 +00:00
parent 56c1c29904
commit 85fb0a0afd

View File

@@ -421,6 +421,7 @@ void wxWindowDisabler::DoDisable(wxWindow *winToSkip)
}
m_modalEventLoop = (wxEventLoop*)wxEventLoopBase::GetActive();
if (m_modalEventLoop)
m_modalEventLoop->BeginModalSession(winToSkip);
}
@@ -429,6 +430,7 @@ wxWindowDisabler::~wxWindowDisabler()
if ( !m_disabled )
return;
if (m_modalEventLoop)
m_modalEventLoop->EndModalSession();
wxWindowList::compatibility_iterator node;