appDisplay: Don't destroy FolderView directly

When FolderIcon is destroyed, it destroyed the FolderView and, if
there's a folder dialog present, it destroys the dialog as well.

Turns out, the folder dialog adds the icon's FolderView to itself.
The view becomes part of the dialog's actor tree. When the dialog
is destroyed, it also tries to destroy the view - but the folder
view was already destroyed by FolderIcon!

Fix that by letting the dialog destroy the folder view if it exists,
otherwise destroy the folder view directly.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
This commit is contained in:
Georges Basile Stavracas Neto 2020-05-20 16:22:36 -03:00
parent 6ba2913075
commit 3c3c3b7c69

View File

@ -1175,15 +1175,15 @@ var FolderIcon = GObject.registerClass({
this._dragMonitor = null;
}
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() {