From 3f651d069d52a5f4dc8f98fa0e3f44ccfd72667e Mon Sep 17 00:00:00 2001 From: in1tiate Date: Sat, 27 Mar 2021 23:01:35 -0500 Subject: [PATCH] add songs with no parent to clist --- src/courtroom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 2d63487..e506395 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -4802,7 +4802,7 @@ void Courtroom::music_random() QTreeWidgetItemIterator::NotHidden | QTreeWidgetItemIterator::NoChildren); while (*it) { - if ((*it)->parent()->isExpanded()) { + if (!(*it)->parent() || (*it)->parent()->isExpanded()) { // add top level songs and songs in expanded categories clist += (*it); } ++it;