summaryrefslogtreecommitdiff
path: root/src/gpm-idle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpm-idle.c')
-rw-r--r--src/gpm-idle.c9
1 files changed, 7 insertions, 2 deletions
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);