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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user