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 (); } }