1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-18 11:39:31 +01:00

Fix crash with empty APE tag for MPC files

This commit is contained in:
Jonas Kvinge 2020-10-21 20:29:06 +02:00
parent 0e8d5bdc5d
commit ffd2e2188a

View File

@ -368,7 +368,7 @@ void TagReader::ReadFile(const QString &filename, pb::tagreader::SongMetadata *s
} }
else if (TagLib::MPC::File* file_mpc = dynamic_cast<TagLib::MPC::File*>(fileref->file())) { else if (TagLib::MPC::File* file_mpc = dynamic_cast<TagLib::MPC::File*>(fileref->file())) {
if (file_mpc->tag()) { if (file_mpc->APETag()) {
ParseAPETag(file_mpc->APETag()->itemListMap(), nullptr, &disc, &compilation, song); ParseAPETag(file_mpc->APETag()->itemListMap(), nullptr, &disc, &compilation, song);
} }
if (tag) Decode(tag->comment(), nullptr, song->mutable_comment()); if (tag) Decode(tag->comment(), nullptr, song->mutable_comment());