git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29346
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/wxprec.h"
#include "wx/mdi.h"
#include "wx/wxprec.h"
#include "wx/mdi.h"
+#include "wx/notebook.h"
while (node)
{
wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame );
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)
{
if (child_frame->m_page == page)
{
{
if (m_menuBar)
delete m_menuBar;
{
if (m_menuBar)
delete m_menuBar;
bool wxMDIChildFrame::Create( wxMDIParentFrame *parent,
wxWindowID id, const wxString& title,
bool wxMDIChildFrame::Create( wxMDIParentFrame *parent,
wxWindowID id, const wxString& title,
wxMDIClientWindow::~wxMDIClientWindow()
{
wxMDIClientWindow::~wxMDIClientWindow()
{
}
bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
}
bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
#include "wx/wxprec.h"
#include "wx/mdi.h"
#include "wx/wxprec.h"
#include "wx/mdi.h"
+#include "wx/notebook.h"
while (node)
{
wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame );
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)
{
if (child_frame->m_page == page)
{
{
if (m_menuBar)
delete m_menuBar;
{
if (m_menuBar)
delete m_menuBar;
bool wxMDIChildFrame::Create( wxMDIParentFrame *parent,
wxWindowID id, const wxString& title,
bool wxMDIChildFrame::Create( wxMDIParentFrame *parent,
wxWindowID id, const wxString& title,
wxMDIClientWindow::~wxMDIClientWindow()
{
wxMDIClientWindow::~wxMDIClientWindow()
{
}
bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )
}
bool wxMDIClientWindow::CreateClient( wxMDIParentFrame *parent, long style )