Use format only when available

This commit is contained in:
Jonas Kvinge
2020-10-13 01:38:09 +02:00
parent 9e23e0a623
commit 83f17a37b1
3 changed files with 14 additions and 14 deletions

View File

@@ -1186,12 +1186,9 @@ void TidalRequest::AlbumCoverReceived(QNetworkReply *reply, const QString &album
}
QList<QByteArray> format_list = Utilities::ImageFormatsForMimeType(mimetype.toUtf8());
QByteArray format;
if (format_list.isEmpty()) {
format = "JPG";
}
else {
format = format_list.first();
char *format = nullptr;
if (!format_list.isEmpty()) {
format = format_list.first().data();
}
QImage image;