[gnome-panel] panel-widget: fix crash moving applets between panels



commit 2ad0b229e3d08cfdc3c91ffccb515409d5502adc
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Dec 10 15:28:03 2015 +0200

    panel-widget: fix crash moving applets between panels

 gnome-panel/panel-widget.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gnome-panel/panel-widget.c b/gnome-panel/panel-widget.c
index aaa8780..dc256f6 100644
--- a/gnome-panel/panel-widget.c
+++ b/gnome-panel/panel-widget.c
@@ -2479,8 +2479,11 @@ panel_widget_reparent (PanelWidget         *old_panel,
        panel_widget_reset_saved_focus (old_panel);
        if (gtk_container_get_focus_child (GTK_CONTAINER (old_panel)) == applet)
                focus_widget = gtk_window_get_focus (GTK_WINDOW (old_panel->toplevel));
+
+       g_object_ref (applet);
        gtk_container_remove (GTK_CONTAINER (old_panel), applet);
        gtk_container_add (GTK_CONTAINER (new_panel), applet);
+       g_object_unref (applet);
 
        if (info && info->type == PANEL_OBJECT_APPLET)
                panel_applet_frame_set_panel (PANEL_APPLET_FRAME (ad->applet), new_panel);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]