From af6c0f1de7b05cc9f85038939efbd79fcd5dc14e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 17 Apr 2006 00:00:58 +0000 Subject: [PATCH] don't eat activation events (replaces patch 1465849) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/mdi.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/gtk/mdi.cpp b/src/gtk/mdi.cpp index f793871ed4..a15c6a7500 100644 --- a/src/gtk/mdi.cpp +++ b/src/gtk/mdi.cpp @@ -70,16 +70,14 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget), child = (wxMDIChildFrame*) NULL; wxWindowList::compatibility_iterator node = client_window->GetChildren().GetFirst(); - while (node) + while ( node ) { wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame ); - // CE: we come here in the destructor with a null child_frame - I think because - // g_signal_connect (m_widget, "switch_page", (see below) - // isn't deleted early enough - if (!child_frame) - return ; - if (child_frame->m_page == page) + // child_frame can be NULL when this is called from dtor, probably + // because g_signal_connect (m_widget, "switch_page", (see below) + // isn't deleted early enough + if ( child_frame && child_frame->m_page == page ) { child = child_frame; break; -- 2.45.2