From 14053a67a19d75963a658af0b28ff2ac050ce1eb Mon Sep 17 00:00:00 2001 From: Erica Z Date: Wed, 16 Oct 2024 12:04:58 +0200 Subject: [PATCH] kill warnings --- src/ui/play_queue.vala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui/play_queue.vala b/src/ui/play_queue.vala index 3d0b09c..6aa2a89 100644 --- a/src/ui/play_queue.vala +++ b/src/ui/play_queue.vala @@ -154,6 +154,7 @@ public class PlayQueueSelection : GLib.Object, GLib.ListModel, Gtk.SelectionMode // GLib.ListModel methods Object? get_item (uint position) { + if (this.model == null) return null; return this.model.get_item (position); } @@ -162,6 +163,7 @@ public class PlayQueueSelection : GLib.Object, GLib.ListModel, Gtk.SelectionMode } uint get_n_items () { + if (this.model == null) return 0; return this.model.get_n_items (); } }