[gnome-boxes/gnome-42] icon-view: Don't launch context popover if icon-view item is unset



commit 1497751cf09f50839af30d2610ec723229748b6c
Author: Felipe Borges <felipeborges gnome org>
Date:   Tue Sep 13 11:32:05 2022 +0200

    icon-view: Don't launch context popover if icon-view item is unset

 src/icon-view.vala | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/icon-view.vala b/src/icon-view.vala
index dcaad597..3711ab93 100644
--- a/src/icon-view.vala
+++ b/src/icon-view.vala
@@ -78,6 +78,8 @@ private bool on_button_press_event (Gdk.EventButton event) {
             return false;
 
         var child = flowbox.get_child_at_pos ((int) event.x, (int) event.y);
+        if (child == null)
+            return false;
 
         return launch_context_popover_for_child (child);
     }


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