From 6a8e73375eade013d2b8d39bf92334da44ed89a4 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Mon, 7 Dec 2015 10:19:12 -0500 Subject: [PATCH] gui/collection: Check for collection_q in on_track_removed() So we don't segfault while removing banned tracks. Signed-off-by: Anna Schumaker --- gui/collection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/collection.cpp b/gui/collection.cpp index 7f8450d1..ae7df681 100644 --- a/gui/collection.cpp +++ b/gui/collection.cpp @@ -56,7 +56,8 @@ static void collection_added(struct queue *queue, unsigned int pos) static void collection_removed(struct queue *queue, unsigned int pos) { - collection_tab->on_track_removed(pos); + if (collection_tab) + collection_tab->on_track_removed(pos); } static void collection_updated(struct queue *queue, unsigned int pos)