[Xfce4-commits] [xfce/xfce4-panel] 01/02: Prevent crash on removing certain plugins (Bug #14418)

noreply at xfce.org noreply at xfce.org
Sun Nov 25 01:08:55 CET 2018


This is an automated email from the git hooks/post-receive script.

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-panel.

commit cf18bd1e7208fae82113d7af5351c76167f0a350
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sun Nov 25 01:06:58 2018 +0100

    Prevent crash on removing certain plugins (Bug #14418)
    
    We now also remove the reference to the menu item and clean up the
    GSList as a whole.
---
 libxfce4panel/xfce-panel-plugin.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index d591b71..d75d362 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -917,7 +917,11 @@ xfce_panel_plugin_finalize (GObject *object)
     {
       /* remove custom items before they get destroyed */
       for (li = plugin->priv->menu_items; li != NULL; li = li->next)
-        gtk_container_remove (GTK_CONTAINER (plugin->priv->menu), GTK_WIDGET (li->data));
+        {
+          gtk_container_remove (GTK_CONTAINER (plugin->priv->menu), GTK_WIDGET (li->data));
+          g_object_unref (G_OBJECT (li->data));
+        }
+      g_slist_free (plugin->priv->menu_items);
       /* attached menu is destroyed by GtkWidget */
       panel_assert (plugin->priv->menu_items == NULL);
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list