From bbcd6a32610ba7da42d615057a5d5092bd083701 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 7 Mar 2021 03:42:11 +0100 Subject: [PATCH] Fix saving empty cleared cover --- src/core/song.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/song.cpp b/src/core/song.cpp index 37d5b3caa..d2e5e3fe3 100644 --- a/src/core/song.cpp +++ b/src/core/song.cpp @@ -1376,8 +1376,8 @@ void Song::BindToQuery(QSqlQuery *query) const { query->bindValue(":compilation_off", d->compilation_off_ ? 1 : 0); query->bindValue(":compilation_effective", is_compilation() ? 1 : 0); - query->bindValue(":art_automatic", d->art_automatic_.toString(QUrl::FullyEncoded)); - query->bindValue(":art_manual", d->art_manual_.toString(QUrl::FullyEncoded)); + query->bindValue(":art_automatic", d->art_automatic_.isValid() ? d->art_automatic_.toString(QUrl::FullyEncoded) : ""); + query->bindValue(":art_manual", d->art_manual_.isValid() ? d->art_manual_.toString(QUrl::FullyEncoded) : ""); query->bindValue(":effective_albumartist", strval(this->effective_albumartist())); query->bindValue(":effective_originalyear", intval(this->effective_originalyear()));