[Xfce4-commits] [xfce/xfce4-panel] 01/01: Avoid double free in panel plugins
noreply at xfce.org
noreply at xfce.org
Wed Mar 29 20:42:42 CEST 2017
This is an automated email from the git hooks/post-receive script.
andrzejr pushed a commit to branch master
in repository xfce/xfce4-panel.
commit 2e1196498e908d31a6c3983304f5019c3b481327
Author: Viktor Odintsev <zakhams at gmail.com>
Date: Fri Mar 17 21:03:33 2017 +0300
Avoid double free in panel plugins
GtkMenu should no be destroyed manually when attached to GtkWidget.
---
libxfce4panel/xfce-panel-plugin.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index 1b3452a..e5ba399 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -915,7 +915,7 @@ xfce_panel_plugin_finalize (GObject *object)
/* destroy the menu */
if (plugin->priv->menu != NULL)
{
- gtk_widget_destroy (GTK_WIDGET (plugin->priv->menu));
+ /* attached menu is destroyed by GtkWidget */
panel_assert (plugin->priv->menu_items == NULL);
}
else
@@ -1133,7 +1133,7 @@ xfce_panel_plugin_menu_destroy (XfcePanelPlugin *plugin)
for (li = plugin->priv->menu_items; li != NULL; li = li->next)
gtk_container_remove (GTK_CONTAINER (plugin->priv->menu), GTK_WIDGET (li->data));
- gtk_widget_destroy (GTK_WIDGET (plugin->priv->menu));
+ gtk_menu_detach (GTK_MENU (plugin->priv->menu));
plugin->priv->menu = NULL;
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list