src/Builder4/PopoverFiles.bjs
authorAlan <alan@roojs.com>
Fri, 29 Jul 2022 07:14:10 +0000 (15:14 +0800)
committerAlan <alan@roojs.com>
Fri, 29 Jul 2022 07:14:10 +0000 (15:14 +0800)
src/Builder4/PopoverFiles.vala

src/Builder4/PopoverFiles.bjs
src/Builder4/PopoverFiles.vala

index 5c867dc..4f47d9d 100644 (file)
              "\tGtk.TreePath path;",
              "\tGtk.CellRenderer cell;",
              "\tvar s = _this.iconview.el.get_item_at_pos(x,y, out path, out cell);",
+             "\tif (path == null) {",
+             "\t\treturn false;",
+             "\t}",
+             "\t",
              "\tGtk.TreeIter iter;",
              "\t_this.iconmodel.el.get_iter(out iter, path);",
              "\tGLib.Value val;",
index 37b924c..a1eb9f2 100644 (file)
@@ -861,6 +861,10 @@ public class Xcls_PopoverFiles : Object
                Gtk.TreePath path;
                Gtk.CellRenderer cell;
                var s = _this.iconview.el.get_item_at_pos(x,y, out path, out cell);
+               if (path == null) {
+                       return false;
+               }
+               
                Gtk.TreeIter iter;
                _this.iconmodel.el.get_iter(out iter, path);
                GLib.Value val;