[gnome-settings-daemon/gnome-3-8] xsettings: unwatch dbus before destroying xsettings managers



commit 85644c197de7d551c08f4409a51d9f20141836c7
Author: Tim Lunn <tim feathertop org>
Date:   Sat Nov 9 10:59:54 2013 +1100

    xsettings: unwatch dbus before destroying xsettings managers
    
    fix possible race since notify_have_shell is getting called after the
    managers are destroyed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711238

 plugins/xsettings/gsd-xsettings-manager.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c
index b0ed011..80fa388 100644
--- a/plugins/xsettings/gsd-xsettings-manager.c
+++ b/plugins/xsettings/gsd-xsettings-manager.c
@@ -966,6 +966,9 @@ gnome_xsettings_manager_stop (GnomeXSettingsManager *manager)
 
         g_debug ("Stopping xsettings manager");
 
+        if (p->shell_name_watch_id > 0)
+                g_bus_unwatch_name (p->shell_name_watch_id);
+
         if (p->managers != NULL) {
                 for (i = 0; p->managers [i]; ++i)
                         xsettings_manager_destroy (p->managers [i]);
@@ -981,9 +984,6 @@ gnome_xsettings_manager_stop (GnomeXSettingsManager *manager)
 
         stop_fontconfig_monitor (manager);
 
-        if (manager->priv->shell_name_watch_id > 0)
-                g_bus_unwatch_name (manager->priv->shell_name_watch_id);
-
         if (p->settings != NULL) {
                 g_hash_table_destroy (p->settings);
                 p->settings = NULL;


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