Dont return from SongSaveComplete early, needs to free TagReaderReply
This commit is contained in:
@@ -403,9 +403,10 @@ void Playlist::SongSaveComplete(TagReaderReply *reply, const QPersistentModelInd
|
|||||||
if (reply->is_successful() && idx.isValid()) {
|
if (reply->is_successful() && idx.isValid()) {
|
||||||
if (reply->message().save_file_response().success()) {
|
if (reply->message().save_file_response().success()) {
|
||||||
PlaylistItemPtr item = item_at(idx.row());
|
PlaylistItemPtr item = item_at(idx.row());
|
||||||
if (!item) return;
|
if (item) {
|
||||||
QFuture<void> future = item->BackgroundReload();
|
QFuture<void> future = item->BackgroundReload();
|
||||||
NewClosure(future, this, SLOT(ItemReloadComplete(QPersistentModelIndex)), idx);
|
NewClosure(future, this, SLOT(ItemReloadComplete(QPersistentModelIndex)), idx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
emit Error(tr("An error occurred writing metadata to '%1'").arg(QString::fromStdString(reply->request_message().save_file_request().filename())));
|
emit Error(tr("An error occurred writing metadata to '%1'").arg(QString::fromStdString(reply->request_message().save_file_request().filename())));
|
||||||
|
|||||||
Reference in New Issue
Block a user