diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index f50d9158c..76546c887 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1175,15 +1175,15 @@ var FolderIcon = GObject.registerClass({ this._dragMonitor = null; } - this.view.destroy(); + if (this._dialog) + this._dialog.destroy(); + else + this.view.destroy(); if (this._folderChangedId) { this._folder.disconnect(this._folderChangedId); delete this._folderChangedId; } - - if (this._dialog) - this._dialog.destroy(); } vfunc_clicked() {