Allow m_docManager to be NULL (patch #12435)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@66911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -80,15 +80,17 @@ bool wxDocMDIParentFrame::ProcessEvent(wxEvent& event)
|
||||
|
||||
void wxDocMDIParentFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
if (m_docManager->Clear(!event.CanVeto()))
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
event.Veto();
|
||||
if ( m_docManager && !m_docManager->Clear(!event.CanVeto()) )
|
||||
{
|
||||
// The user decided not to close finally, abort.
|
||||
event.Veto();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Default document child frame for MDI children
|
||||
*/
|
||||
|
@@ -2010,12 +2010,15 @@ bool wxDocParentFrame::ProcessEvent(wxEvent& event)
|
||||
// - must delete all frames except for the main one.
|
||||
void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
if (m_docManager->Clear(!event.CanVeto()))
|
||||
if ( m_docManager && !m_docManager->Clear(!event.CanVeto()) )
|
||||
{
|
||||
// The user decided not to close finally, abort.
|
||||
event.Veto();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
else
|
||||
event.Veto();
|
||||
}
|
||||
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
|
Reference in New Issue
Block a user