Merge pull request #506 from AttorneyOnline/fix/song-parents

Fix a crash when shuffling songlists that have songs with no parent category
This commit is contained in:
oldmud0 2021-03-28 18:55:14 -05:00 committed by GitHub
commit 7583c57442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;