Prevent a Gtk-CRITICAL message when Remove()ing a menu from a menubar

that has submenus.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-04-23 21:08:42 +00:00
parent 1bc54e3257
commit 368a4a4784
2 changed files with 4 additions and 2 deletions

View File

@@ -1124,7 +1124,8 @@ wxMenu::~wxMenu()
{
m_items.Clear();
gtk_widget_destroy( m_menu );
if ( GTK_IS_WIDGET( m_menu ))
gtk_widget_destroy( m_menu );
gtk_object_unref( GTK_OBJECT(m_factory) );
}