[gnome-shell] appDisplay: Handle null value



commit 5b3036a6bf431f5f398f14b0dc869ed79d0a63f2
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Aug 13 03:09:51 2021 +0200

    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>

 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 3673c85416..a3e60b834f 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() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]