summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2014-02-14 10:10:20 -0500
committerRyan Lortie <desrt@desrt.ca>2014-02-14 10:09:47 -0500
commitad1e23ce7d99def1d315f3e25a037f2eec6bc4d0 (patch)
tree8222fb3177e399ac0f8991ac89fc8bb209730b53
parent52d411bd85f884ce9d8a4ac579a3c422bc7de1ac (diff)
downloadmutter-ad1e23ce7d99def1d315f3e25a037f2eec6bc4d0.tar.gz
idle-monitor: avoid XSyncBadAlarm X error
If we fail to find the IDLETIME counter, then the alarm variable will be uninitialised. Most code paths are careful to check this before submitting XSync calls, but there is one check missing. https://bugzilla.gnome.org/show_bug.cgi?id=724364
-rw-r--r--src/core/meta-idle-monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/meta-idle-monitor.c b/src/core/meta-idle-monitor.c
index 77d26f390..eda92893f 100644
--- a/src/core/meta-idle-monitor.c
+++ b/src/core/meta-idle-monitor.c
@@ -499,7 +499,7 @@ make_watch (MetaIdleMonitor *monitor,
if (meta_idle_monitor_get_idletime (monitor) > (gint64)timeout_msec)
watch->idle_source_id = g_idle_add (fire_watch_idle, watch);
}
- else
+ else if (monitor->user_active_alarm != None)
{
watch->xalarm = monitor->user_active_alarm;