diff options
-rw-r--r-- | src/gpm-dpms.c | 4 | ||||
-rw-r--r-- | src/gpm-idle.c | 9 | ||||
-rw-r--r-- | src/gpm-manager.c | 5 |
3 files changed, 14 insertions, 4 deletions
diff --git a/src/gpm-dpms.c b/src/gpm-dpms.c index 8eaf704..644ffe7 100644 --- a/src/gpm-dpms.c +++ b/src/gpm-dpms.c @@ -321,8 +321,10 @@ gpm_dpms_finalize (GObject *object) g_return_if_fail (dpms->priv != NULL); - if (dpms->priv->timer_id != 0) + if (dpms->priv->timer_id != 0) { g_source_remove (dpms->priv->timer_id); + dpms->priv->timer_id = 0; + } G_OBJECT_CLASS (gpm_dpms_parent_class)->finalize (object); } diff --git a/src/gpm-idle.c b/src/gpm-idle.c index a7132fa..67dbeee 100644 --- a/src/gpm-idle.c +++ b/src/gpm-idle.c @@ -411,10 +411,15 @@ gpm_idle_finalize (GObject *object) g_return_if_fail (idle->priv != NULL); - if (idle->priv->timeout_blank_id != 0) + if (idle->priv->timeout_blank_id != 0) { g_source_remove (idle->priv->timeout_blank_id); - if (idle->priv->timeout_sleep_id != 0) + idle->priv->timeout_blank_id = 0; + } + + if (idle->priv->timeout_sleep_id != 0) { g_source_remove (idle->priv->timeout_sleep_id); + idle->priv->timeout_sleep_id = 0; + } g_object_unref (idle->priv->load); g_object_unref (idle->priv->session); diff --git a/src/gpm-manager.c b/src/gpm-manager.c index f6c498e..050d3ec 100644 --- a/src/gpm-manager.c +++ b/src/gpm-manager.c @@ -1945,8 +1945,11 @@ gpm_manager_finalize (GObject *object) gpm_manager_notify_close (manager, manager->priv->notification_discharging); if (manager->priv->notification_fully_charged != NULL) gpm_manager_notify_close (manager, manager->priv->notification_fully_charged); - if (manager->priv->critical_alert_timeout_id != 0) + + if (manager->priv->critical_alert_timeout_id != 0) { g_source_remove (manager->priv->critical_alert_timeout_id); + manager->priv->critical_alert_timeout_id = 0; + } g_object_unref (manager->priv->settings); g_object_unref (manager->priv->dpms); |