[Xfce4-commits] [xfce/xfce4-panel] 01/02: panel-plugin: Try to fix crashes when removing plugins (Bug #14144)

noreply at xfce.org noreply at xfce.org
Tue Jun 5 01:04:34 CEST 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 d614f388b0202ae55377b1058d90381b226f4deb
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Tue May 29 00:09:27 2018 +0200

    panel-plugin: Try to fix crashes when removing plugins (Bug #14144)
    
    While one would expect the menu to be destroyed at this point, it seems
    not to be the case, so we try to handle it by removing all custom items
    from the menu.
---
 libxfce4panel/xfce-panel-plugin.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index 9642329..54b5158 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -915,6 +915,9 @@ xfce_panel_plugin_finalize (GObject *object)
   /* destroy the menu */
   if (plugin->priv->menu != NULL)
     {
+      /* 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));
       /* 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