endSessionDialog: Fix a warning

If _timerId is undefined/null, as it is by default, we will take this
path, and fail when trying to remove a source ID for undefined.

https://bugzilla.gnome.org/show_bug.cgi?id=706612
This commit is contained in:
Jasper St. Pierre 2013-08-22 16:17:52 -04:00
parent ce768241da
commit 77dc587686

View File

@ -442,7 +442,7 @@ const EndSessionDialog = new Lang.Class({
},
_stopTimer: function() {
if (this._timerId != 0) {
if (this._timerId > 0) {
Mainloop.source_remove(this._timerId);
this._timerId = 0;
}