diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 4a126981b..ae40f3e90 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1658,7 +1658,10 @@ const AppIcon = new Lang.Class({ if (!isPoppedUp) this._onMenuPoppedDown(); })); - Main.overview.connect('hiding', Lang.bind(this, function () { this._menu.close(); })); + let id = Main.overview.connect('hiding', Lang.bind(this, function () { this._menu.close(); })); + this.actor.connect('destroy', function() { + Main.overview.disconnect(id); + }); this._menuManager.addMenu(this._menu); }