Don't crash in wxMenuBar::Remove() if unattached in wxGTK.
It should be possible to remove a menu from a menu bar even before it is attached to a frame without crashing. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -339,7 +339,8 @@ wxMenu *wxMenuBar::Remove(size_t pos)
|
|||||||
gtk_widget_destroy( menu->m_owner );
|
gtk_widget_destroy( menu->m_owner );
|
||||||
menu->m_owner = NULL;
|
menu->m_owner = NULL;
|
||||||
|
|
||||||
DetachFromFrame( menu, m_menuBarFrame );
|
if ( m_menuBarFrame )
|
||||||
|
DetachFromFrame( menu, m_menuBarFrame );
|
||||||
|
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user