appDisplay: Handle null value

The value can not actually be null at that point, but it's too
hard to spot for tools like coverity:
 - before setting view, we chain up to the parent's acceptDrop()
 - that calls _canAccept(), which we override and check for the view

Still, and extra ? doesn't hurt, and hopefully will make the tooling
happy.

CID 351269

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>
This commit is contained in:
Florian Müllner 2021-08-13 03:09:51 +02:00
parent 941419e165
commit 5b3036a6bf

View File

@ -3399,7 +3399,7 @@ var AppIcon = GObject.registerClass({
let view = _getViewFromIcon(this); let view = _getViewFromIcon(this);
let apps = [this.id, source.id]; let apps = [this.id, source.id];
return view.createFolder(apps); return view?.createFolder(apps);
} }
cancelActions() { cancelActions() {