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
This commit is contained in:
Rui Matos 2012-12-01 20:40:13 +01:00
parent cd58f9f9e5
commit 5faeaa2028

View File

@ -417,6 +417,13 @@ const AppSwitcher = new Lang.Class({
this._iconSize = 0; this._iconSize = 0;
this._altTabPopup = altTabPopup; this._altTabPopup = altTabPopup;
this._mouseTimeOutId = 0; 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) { _getPreferredHeight: function (actor, forWidth, alloc) {