Fix a crash when creating a new smart playlist

This commit is contained in:
David Sansome 2011-11-29 12:35:01 +00:00
parent b9bf35948a
commit 0aba1ce77d
1 changed files with 4 additions and 0 deletions

View File

@ -1637,6 +1637,10 @@ bool AlbumShuffleComparator(const QMap<QString, int>& album_key_positions,
}
void Playlist::ReshuffleIndices() {
if (!playlist_sequence_) {
return;
}
if (playlist_sequence_->shuffle_mode() == PlaylistSequence::Shuffle_Off) {
// No shuffling - sort the virtual item list normally.
std::sort(virtual_items_.begin(), virtual_items_.end());