summaryrefslogtreecommitdiff
path: root/src/gpm-idle.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2015-11-12 13:27:10 +0300
committermonsta <[email protected]>2015-11-30 10:45:25 +0300
commitb6c8f86bd32139b22513408bd402d1840ea13302 (patch)
tree069599bb3bcfe2ece59bb61578a05e271696eb4b /src/gpm-idle.c
parentb1c76b5a6639ff268d557c3e4b7f03ea9d9db677 (diff)
downloadmate-power-manager-b6c8f86bd32139b22513408bd402d1840ea13302.tar.bz2
mate-power-manager-b6c8f86bd32139b22513408bd402d1840ea13302.tar.xz
fix warnings due to wrong id passed to g_source_remove
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);