From 209d332a30fff85f4d607111445ab8c0fa15c195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 9 Aug 2019 23:30:44 +0200 Subject: [PATCH] AppIcon: Nullify _draggable if available on destruction When an AppIcon actor is destroyed we try to unset a non-existent draggable property. Fix the typo, doing this even if we're not currently in a drag operation. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/677 --- js/ui/appDisplay.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 50b8fd9b9..ac6d8ce25 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1897,9 +1897,10 @@ var AppIcon = class AppIcon { } if (this._stateChangedId > 0) this.app.disconnect(this._stateChangedId); - if (this._draggable && this._dragging) { - Main.overview.endItemDrag(this); - this.draggable = null; + if (this._draggable) { + if (this._dragging) + Main.overview.endItemDrag(this); + this._draggable = null; } this._stateChangedId = 0; this._removeMenuTimeout();