Fix a crash when reaching the end of a playlist

This commit is contained in:
David Sansome 2010-04-21 17:11:02 +00:00
parent 81b46f2eff
commit 06aaaf15f5
1 changed files with 2 additions and 0 deletions

View File

@ -535,6 +535,8 @@ void Player::TrackAboutToEnd() {
// gap between songs.
if (current_item_options_ & PlaylistItem::ContainsMultipleTracks)
return;
if (playlist_->next_index() == -1)
return;
shared_ptr<PlaylistItem> item = playlist_->item_at(playlist_->next_index());
if (!item)