X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/147d666989aeeefe8c8f23be050d71891afbfd2e..ddc548ec7796fd689dbc2eda7be08598d1dc885c:/src/gtk1/mdi.cpp diff --git a/src/gtk1/mdi.cpp b/src/gtk1/mdi.cpp index 99c278b2d5..36b2f789f0 100644 --- a/src/gtk1/mdi.cpp +++ b/src/gtk1/mdi.cpp @@ -170,17 +170,19 @@ void wxMDIParentFrame::OnInternalIdle() /* need to set the menubar of the child */ wxMDIChildFrame *active_child_frame = GetActiveChild(); - wxMenuBar *menu_bar = active_child_frame->m_menuBar; - if (menu_bar) + if (active_child_frame != NULL) { - menu_bar->m_width = m_width; - menu_bar->m_height = wxMENU_HEIGHT; - gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), - menu_bar->m_widget, - 0, 0, m_width, wxMENU_HEIGHT ); - menu_bar->SetInvokingWindow(active_child_frame); + wxMenuBar *menu_bar = active_child_frame->m_menuBar; + if (menu_bar) + { + menu_bar->m_width = m_width; + menu_bar->m_height = wxMENU_HEIGHT; + gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), + menu_bar->m_widget, + 0, 0, m_width, wxMENU_HEIGHT ); + menu_bar->SetInvokingWindow(active_child_frame); + } } - m_justInserted = false; return; }