From 5b3036a6bf431f5f398f14b0dc869ed79d0a63f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 13 Aug 2021 03:09:51 +0200 Subject: [PATCH] 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: --- js/ui/appDisplay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 3673c8541..a3e60b834 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -3399,7 +3399,7 @@ var AppIcon = GObject.registerClass({ let view = _getViewFromIcon(this); let apps = [this.id, source.id]; - return view.createFolder(apps); + return view?.createFolder(apps); } cancelActions() {