From 77dc587686b8f46828371baa995a6019db0a8338 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 22 Aug 2013 16:17:52 -0400 Subject: [PATCH] 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 --- js/ui/endSessionDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js index c36f5532d..48ff151bf 100644 --- a/js/ui/endSessionDialog.js +++ b/js/ui/endSessionDialog.js @@ -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; }