summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-12-18 12:44:02 +0100
committerStefano Karapetsas <[email protected]>2012-12-18 12:44:02 +0100
commit0cb02b751bc95014936837441006bbc098d3730c (patch)
tree9899f98ad695326b1a952bae98378584bc241934
parentc2ec565b1f6dd95520537482d3d0fd1a4b0e5323 (diff)
downloadmate-panel-0cb02b751bc95014936837441006bbc098d3730c.tar.bz2
mate-panel-0cb02b751bc95014936837441006bbc098d3730c.tar.xz
Fix crash on deleting panels
https://github.com/mate-desktop/mate-panel/issues/65
-rw-r--r--mate-panel/panel-profile.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mate-panel/panel-profile.c b/mate-panel/panel-profile.c
index 7353112b..7d9ac072 100644
--- a/mate-panel/panel-profile.c
+++ b/mate-panel/panel-profile.c
@@ -1040,6 +1040,16 @@ panel_profile_delete_toplevel (PanelToplevel *toplevel)
toplevel_id = panel_profile_get_toplevel_id (toplevel);
+ /* disable GSettings signals */
+ if (toplevel->settings) {
+ g_object_unref (toplevel->settings);
+ toplevel->settings = NULL;
+ }
+ if (toplevel->background_settings) {
+ g_object_unref (toplevel->background_settings);
+ toplevel->background_settings = NULL;
+ }
+
panel_profile_delete_toplevel_objects (toplevel_id);
panel_profile_remove_from_list (PANEL_GSETTINGS_TOPLEVELS, toplevel_id);