From 654f553d8f6d10dd7b542d94ba4b2ebe706be237 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 17 Aug 2019 00:52:29 +0200 Subject: [PATCH] Move InformOfCurrentSongChange() to fix crash when active playlist item is reset --- src/core/player.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/player.cpp b/src/core/player.cpp index 4b9a8d1ce..2f9e0dbcd 100644 --- a/src/core/player.cpp +++ b/src/core/player.cpp @@ -606,9 +606,10 @@ void Player::PlayAt(int index, Engine::TrackChangeFlags change, bool reshuffle) } else { qLog(Debug) << "Playing song" << current_item_->Metadata().title() << url; - engine_->Play(url, current_item_->Url(), change, current_item_->Metadata().has_cue(), current_item_->Metadata().beginning_nanosec(), current_item_->Metadata().end_nanosec()); - if (current_item_->HasTemporaryMetadata()) + if (current_item_->HasTemporaryMetadata()) { app_->playlist_manager()->active()->InformOfCurrentSongChange(); + } + engine_->Play(url, current_item_->Url(), change, current_item_->Metadata().has_cue(), current_item_->Metadata().beginning_nanosec(), current_item_->Metadata().end_nanosec()); } }