aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorin1tiate <radwoodward@vikings.grayson.edu>2021-03-27 23:01:35 -0500
committerin1tiate <radwoodward@vikings.grayson.edu>2021-03-27 23:01:35 -0500
commit3f651d069d52a5f4dc8f98fa0e3f44ccfd72667e (patch)
treeb1ecb1f337c81de21e8e4877122a9061bf82266d
parente9eba9b5ab1b022905d2f6dbe8e6ad2e2a516372 (diff)
add songs with no parent to clist
-rw-r--r--src/courtroom.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 2d634879..e5063954 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;