diff options
author | Ryan Lortie <desrt@desrt.ca> | 2014-02-14 10:10:20 -0500 |
---|---|---|
committer | Adel Gadllah <adel.gadllah@gmail.com> | 2014-02-15 13:14:29 +0100 |
commit | a3f3c60a6c32bd4fe420a5cf593ccc258ce99f3a (patch) | |
tree | 71e90b90f6f057d387fa210e38c8a6a9acf8bfbf | |
parent | b39ef6a9611f5dbd33ec5ba625222efab402c45b (diff) |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/meta-idle-monitor.c b/src/core/meta-idle-monitor.c index a516d990..365680c9 100644 --- a/src/core/meta-idle-monitor.c +++ b/src/core/meta-idle-monitor.c @@ -501,7 +501,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; |