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:
commit
7583c57442
@ -4802,7 +4802,7 @@ void Courtroom::music_random()
|
|||||||
QTreeWidgetItemIterator::NotHidden |
|
QTreeWidgetItemIterator::NotHidden |
|
||||||
QTreeWidgetItemIterator::NoChildren);
|
QTreeWidgetItemIterator::NoChildren);
|
||||||
while (*it) {
|
while (*it) {
|
||||||
if ((*it)->parent()->isExpanded()) {
|
if (!(*it)->parent() || (*it)->parent()->isExpanded()) { // add top level songs and songs in expanded categories
|
||||||
clist += (*it);
|
clist += (*it);
|
||||||
}
|
}
|
||||||
++it;
|
++it;
|
||||||
|
Loading…
Reference in New Issue
Block a user