fixed menu destruction if it was removed from menubar with Remove
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -982,8 +982,12 @@ wxMenu::~wxMenu()
|
|||||||
|
|
||||||
if ( GTK_IS_WIDGET( m_menu ))
|
if ( GTK_IS_WIDGET( m_menu ))
|
||||||
{
|
{
|
||||||
gtk_widget_unref( m_menu ); // see wxMenu::Init
|
// see wxMenu::Init
|
||||||
gtk_widget_destroy( m_menu );
|
gtk_widget_unref( m_menu );
|
||||||
|
// if the menu is inserted in another menu at this time, there was
|
||||||
|
// one more reference to it:
|
||||||
|
if ( m_owner )
|
||||||
|
gtk_widget_destroy( m_menu );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -982,8 +982,12 @@ wxMenu::~wxMenu()
|
|||||||
|
|
||||||
if ( GTK_IS_WIDGET( m_menu ))
|
if ( GTK_IS_WIDGET( m_menu ))
|
||||||
{
|
{
|
||||||
gtk_widget_unref( m_menu ); // see wxMenu::Init
|
// see wxMenu::Init
|
||||||
gtk_widget_destroy( m_menu );
|
gtk_widget_unref( m_menu );
|
||||||
|
// if the menu is inserted in another menu at this time, there was
|
||||||
|
// one more reference to it:
|
||||||
|
if ( m_owner )
|
||||||
|
gtk_widget_destroy( m_menu );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user