mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 11:35:24 +01:00
Don't crash at the end of the last song on a playlist
This commit is contained in:
parent
cf826aeee0
commit
85502e5516
@ -392,8 +392,11 @@ void Player::TrackAboutToEnd() {
|
|||||||
const bool current_contains_multiple_tracks =
|
const bool current_contains_multiple_tracks =
|
||||||
current_item_->options() & PlaylistItem::ContainsMultipleTracks;
|
current_item_->options() & PlaylistItem::ContainsMultipleTracks;
|
||||||
const bool has_next_row = playlists_->active()->next_row() != -1;
|
const bool has_next_row = playlists_->active()->next_row() != -1;
|
||||||
const PlaylistItemPtr next_item = playlists_->active()->item_at(
|
PlaylistItemPtr next_item;
|
||||||
playlists_->active()->next_row());
|
|
||||||
|
if (has_next_row) {
|
||||||
|
next_item = playlists_->active()->item_at(playlists_->active()->next_row());
|
||||||
|
}
|
||||||
|
|
||||||
if (engine_->is_autocrossfade_enabled()) {
|
if (engine_->is_autocrossfade_enabled()) {
|
||||||
// Crossfade is on, so just start playing the next track. The current one
|
// Crossfade is on, so just start playing the next track. The current one
|
||||||
|
Loading…
x
Reference in New Issue
Block a user