- wxMenuBar *menu_bar = active_child_frame->m_menuBar;
- 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);
-
+ if (active_child_frame != NULL)
+ {
+ wxMenuBar *menu_bar = active_child_frame->m_menuBar;
+ if (menu_bar)
+ {
+ GTKDoGetSize(&menu_bar->m_width, NULL);
+ menu_bar->m_height = wxMENU_HEIGHT;
+ gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
+ menu_bar->m_widget,
+ 0, 0, menu_bar->m_width, menu_bar->m_height);
+ menu_bar->SetInvokingWindow(active_child_frame);
+ }
+ }