X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d608029081474c1a5b005451661fbfdcea39e80..258bcbfbd3b519d2498c6f0218ee938181170900:/src/gtk1/mdi.cpp diff --git a/src/gtk1/mdi.cpp b/src/gtk1/mdi.cpp index f1006d4ca5..131cee85cb 100644 --- a/src/gtk1/mdi.cpp +++ b/src/gtk1/mdi.cpp @@ -15,6 +15,7 @@ #include "wx/wxprec.h" #include "wx/mdi.h" +#include "wx/notebook.h" #if wxUSE_MDI @@ -82,8 +83,11 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget), while (node) { wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame ); - - wxASSERT_MSG( child_frame, _T("child is not a wxMDIChildFrame") ); + // CE: we come here in the destructor with a null child_frame - I think because + // gtk_signal_connect( GTK_OBJECT(m_widget), "switch_page", (see below) + // isn't deleted early enough + if (!child_frame) + return ; if (child_frame->m_page == page) { @@ -329,7 +333,7 @@ wxMDIChildFrame::~wxMDIChildFrame() { if (m_menuBar) delete m_menuBar; -} +} bool wxMDIChildFrame::Create( wxMDIParentFrame *parent, wxWindowID id, const wxString& title, @@ -484,6 +488,7 @@ wxMDIClientWindow::wxMDIClientWindow( wxMDIParentFrame *parent, long style ) wxMDIClientWindow::~wxMDIClientWindow() { + } bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )