1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-19 04:50:16 +01:00

Don't crash at the end of the last song on a playlist

This commit is contained in:
David Sansome 2011-03-14 20:04:33 +00:00
parent cf826aeee0
commit 85502e5516

View File

@ -392,8 +392,11 @@ void Player::TrackAboutToEnd() {
const bool current_contains_multiple_tracks =
current_item_->options() & PlaylistItem::ContainsMultipleTracks;
const bool has_next_row = playlists_->active()->next_row() != -1;
const PlaylistItemPtr next_item = playlists_->active()->item_at(
playlists_->active()->next_row());
PlaylistItemPtr next_item;
if (has_next_row) {
next_item = playlists_->active()->item_at(playlists_->active()->next_row());
}
if (engine_->is_autocrossfade_enabled()) {
// Crossfade is on, so just start playing the next track. The current one