From 5faeaa2028c7328413ffa6a60bf8479130b87dcb Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Sat, 1 Dec 2012 20:40:13 +0100 Subject: [PATCH] AppSwitcher: Remove a lost timeout on destroy Doesn't look harmful but there's no point in running this code after we're destroyed. https://bugzilla.gnome.org/show_bug.cgi?id=689528 --- js/ui/altTab.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/ui/altTab.js b/js/ui/altTab.js index 74a03a0fb..b58721923 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -417,6 +417,13 @@ const AppSwitcher = new Lang.Class({ this._iconSize = 0; this._altTabPopup = altTabPopup; this._mouseTimeOutId = 0; + + this.actor.connect('destroy', Lang.bind(this, this._onDestroy)); + }, + + _onDestroy: function() { + if (this._mouseTimeOutId != 0) + Mainloop.source_remove(this._mouseTimeOutId); }, _getPreferredHeight: function (actor, forWidth, alloc) {