From 9b04ebcd71e9f6fa477d4302449c85e011cd971a Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Mon, 27 Mar 2017 09:04:02 -0400 Subject: [PATCH] gui/playlist: Block __playlist_update_sizes() during startup Otherwise we'll get a bunch of messages printed out saying that p_store isn't a GtkTreeModel Signed-off-by: Anna Schumaker --- gui/playlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/playlist.c b/gui/playlist.c index c8f59e84..8b979600 100644 --- a/gui/playlist.c +++ b/gui/playlist.c @@ -218,11 +218,11 @@ static bool __playlist_queue_set_size(struct queue *queue, GtkTreeIter *iter) static void __playlist_update_sizes(struct queue *queue) { - GtkTreeModel *model = GTK_TREE_MODEL(p_store); + GtkTreeModel *model = p_store ? GTK_TREE_MODEL(p_store) : NULL; GtkTreeModelFilter *filter; GtkTreeIter parent, iter; - if (!gtk_tree_model_get_iter_first(model, &parent)) + if (!model || !gtk_tree_model_get_iter_first(model, &parent)) return; do {