[gnome-shell] endSessionDialog: Fix a warning



commit 77dc587686b8f46828371baa995a6019db0a8338
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Aug 22 16:17:52 2013 -0400

    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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
index c36f553..48ff151 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;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]