[gnome-settings-daemon/gnome-3-4] daemon: don't unref member objects twice on dispose



commit f3e5a738c7d663adedb98829fb69bb389a10e775
Author: Daiki Ueno <ueno unixuser org>
Date:   Thu Apr 5 16:41:12 2012 +0900

    daemon: don't unref member objects twice on dispose
    
    https://bugzilla.gnome.org/show_bug.cgi?id=673555

 gnome-settings-daemon/gnome-settings-manager.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnome-settings-daemon/gnome-settings-manager.c b/gnome-settings-daemon/gnome-settings-manager.c
index 13faeba..672c53f 100644
--- a/gnome-settings-daemon/gnome-settings-manager.c
+++ b/gnome-settings-daemon/gnome-settings-manager.c
@@ -461,11 +461,11 @@ gnome_settings_manager_stop (GnomeSettingsManager *manager)
                 manager->priv->owner_id = 0;
         }
 
-        g_object_unref (manager->priv->settings);
-        manager->priv->settings = NULL;
+        if (manager->priv->settings)
+                g_clear_object (&manager->priv->settings);
 
-        g_object_unref (manager->priv->pnp_ids);
-        manager->priv->pnp_ids = NULL;
+        if (manager->priv->pnp_ids)
+                g_clear_object (&manager->priv->pnp_ids);
 }
 
 static void



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