diff options
Diffstat (limited to 'module/menuproxy.cc')
-rw-r--r-- | module/menuproxy.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/module/menuproxy.cc b/module/menuproxy.cc index 5536bf5..a59a576 100644 --- a/module/menuproxy.cc +++ b/module/menuproxy.cc @@ -53,9 +53,11 @@ MenuProxy::~MenuProxy() { Q_FOREACH(GtkMenu *menu, m_menus) { gtk_widget_destroy(GTK_WIDGET(menu)); + g_object_unref(menu); } Q_FOREACH(GtkMenuItem *item, m_items) { gtk_widget_destroy(GTK_WIDGET(item)); + g_object_unref(item); } if (m_accel) { g_object_unref(m_accel); @@ -165,6 +167,7 @@ void MenuProxy::removeAction(QAction *action) } gtk_widget_destroy(GTK_WIDGET(item)); + g_object_unref(item); m_items.remove(action); } @@ -175,11 +178,12 @@ void MenuProxy::removeMenu(QMenu *menu) GtkWidget *g_item = gtk_menu_get_attach_widget(g_menu); Q_ASSERT(g_item); GtkMenu *g_parent = GTK_MENU(gtk_widget_get_parent(g_item)); - Q_ASSERT(g_parent), + Q_ASSERT(g_parent); menu->removeEventFilter(this); gtk_widget_destroy(GTK_WIDGET(g_menu)); + g_object_unref(g_menu); m_menus.remove(menu); } |