[gnome-settings-daemon] power: Destroy connection on finalize not stop
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Destroy connection on finalize not stop
- Date: Sat, 12 Jan 2013 21:12:29 +0000 (UTC)
commit 75991ad1fef038f5aea6ddd91d537c1e6a37144e
Author: Bastien Nocera <hadess hadess net>
Date: Sat Jan 12 18:49:47 2013 +0100
power: Destroy connection on finalize not stop
The connection is created when the plugin is instantiated, so
destroy it when the plugin goes away, not on _stop()
plugins/power/gsd-power-manager.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 9b5a7b8..5dc7cb2 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -3297,6 +3297,8 @@ gsd_power_manager_finalize (GObject *object)
g_return_if_fail (manager->priv != NULL);
+ g_clear_object (&manager->priv->connection);
+
if (manager->priv->name_id != 0)
g_bus_unown_name (manager->priv->name_id);
@@ -4166,7 +4168,6 @@ gsd_power_manager_stop (GsdPowerManager *manager)
g_signal_handlers_disconnect_by_data (manager->priv->up_client, manager);
- g_clear_object (&manager->priv->connection);
g_clear_object (&manager->priv->session);
g_clear_object (&manager->priv->settings);
g_clear_object (&manager->priv->settings_screensaver);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]