From 73c7024e11afb42150a5ea073e2682a5ce0de7e2 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 9 Nov 2020 19:17:31 +0100 Subject: [PATCH] Dont return from SongSaveComplete early, needs to free TagReaderReply --- src/playlist/playlist.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/playlist/playlist.cpp b/src/playlist/playlist.cpp index 63124acb2..4664990bf 100644 --- a/src/playlist/playlist.cpp +++ b/src/playlist/playlist.cpp @@ -403,9 +403,10 @@ void Playlist::SongSaveComplete(TagReaderReply *reply, const QPersistentModelInd if (reply->is_successful() && idx.isValid()) { if (reply->message().save_file_response().success()) { PlaylistItemPtr item = item_at(idx.row()); - if (!item) return; - QFuture future = item->BackgroundReload(); - NewClosure(future, this, SLOT(ItemReloadComplete(QPersistentModelIndex)), idx); + if (item) { + QFuture future = item->BackgroundReload(); + NewClosure(future, this, SLOT(ItemReloadComplete(QPersistentModelIndex)), idx); + } } else { emit Error(tr("An error occurred writing metadata to '%1'").arg(QString::fromStdString(reply->request_message().save_file_request().filename())));