GNOME Bugzilla – Bug 706825
idle-monitor: Fix a warning when a callback removes the user active watch
Last modified: 2013-08-26 21:28:59 UTC
See patch. This caused spurious META_IS_IDLE_MONITOR failed warnings for me.
Created attachment 253169 [details] [review] idle-monitor: Fix a warning when a callback removes the user active watch The user active watch is a one-fire watch, but it is valid in the API for the callback to explicitly remove the watch itself. In that case, the watch will be invalid after the user removes it, and the memory potentially freed. So make sure to not dereference the watch after the callback is called.
Review of attachment 253169 [details] [review]: Oh! Now I see why we had the g_object_ref() for the monitor, and the check on the X Alarm instead of a flag in the watch...
Attachment 253169 [details] pushed as 576cd87 - idle-monitor: Fix a warning when a callback removes the user active watch