avoid crash if active_child_frame is not set yet
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -170,6 +170,8 @@ void wxMDIParentFrame::OnInternalIdle()
|
|||||||
|
|
||||||
/* need to set the menubar of the child */
|
/* need to set the menubar of the child */
|
||||||
wxMDIChildFrame *active_child_frame = GetActiveChild();
|
wxMDIChildFrame *active_child_frame = GetActiveChild();
|
||||||
|
if (active_child_frame != NULL)
|
||||||
|
{
|
||||||
wxMenuBar *menu_bar = active_child_frame->m_menuBar;
|
wxMenuBar *menu_bar = active_child_frame->m_menuBar;
|
||||||
if (menu_bar)
|
if (menu_bar)
|
||||||
{
|
{
|
||||||
@@ -180,7 +182,7 @@ void wxMDIParentFrame::OnInternalIdle()
|
|||||||
0, 0, m_width, wxMENU_HEIGHT );
|
0, 0, m_width, wxMENU_HEIGHT );
|
||||||
menu_bar->SetInvokingWindow(active_child_frame);
|
menu_bar->SetInvokingWindow(active_child_frame);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
m_justInserted = false;
|
m_justInserted = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -170,6 +170,8 @@ void wxMDIParentFrame::OnInternalIdle()
|
|||||||
|
|
||||||
/* need to set the menubar of the child */
|
/* need to set the menubar of the child */
|
||||||
wxMDIChildFrame *active_child_frame = GetActiveChild();
|
wxMDIChildFrame *active_child_frame = GetActiveChild();
|
||||||
|
if (active_child_frame != NULL)
|
||||||
|
{
|
||||||
wxMenuBar *menu_bar = active_child_frame->m_menuBar;
|
wxMenuBar *menu_bar = active_child_frame->m_menuBar;
|
||||||
if (menu_bar)
|
if (menu_bar)
|
||||||
{
|
{
|
||||||
@@ -180,7 +182,7 @@ void wxMDIParentFrame::OnInternalIdle()
|
|||||||
0, 0, m_width, wxMENU_HEIGHT );
|
0, 0, m_width, wxMENU_HEIGHT );
|
||||||
menu_bar->SetInvokingWindow(active_child_frame);
|
menu_bar->SetInvokingWindow(active_child_frame);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
m_justInserted = false;
|
m_justInserted = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user