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
This commit is contained in:
Vadim Zeitlin 2006-04-17 00:00:58 +00:00
parent 3700e21b91
commit af6c0f1de7

View File

@ -70,16 +70,14 @@ gtk_mdi_page_change_callback( GtkNotebook *WXUNUSED(widget),
child = (wxMDIChildFrame*) NULL; child = (wxMDIChildFrame*) NULL;
wxWindowList::compatibility_iterator node = client_window->GetChildren().GetFirst(); wxWindowList::compatibility_iterator node = client_window->GetChildren().GetFirst();
while (node) while ( node )
{ {
wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame ); 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; child = child_frame;
break; break;