From 0e8d5bdc5d76c2701dae0e3a7a75c5a9e13623f5 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 21 Oct 2020 20:27:43 +0200 Subject: [PATCH] Fix crash with empty APE tag for WavPack and APE files --- ext/libstrawberry-tagreader/tagreader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/libstrawberry-tagreader/tagreader.cpp b/ext/libstrawberry-tagreader/tagreader.cpp index cf43643d4..c46386008 100644 --- a/ext/libstrawberry-tagreader/tagreader.cpp +++ b/ext/libstrawberry-tagreader/tagreader.cpp @@ -235,14 +235,14 @@ void TagReader::ReadFile(const QString &filename, pb::tagreader::SongMetadata *s else if (TagLib::WavPack::File *file_wavpack = dynamic_cast(fileref->file())) { song->set_bitdepth(file_wavpack->audioProperties()->bitsPerSample()); - if (file_wavpack->tag()) { + if (file_wavpack->APETag()) { ParseAPETag(file_wavpack->APETag()->itemListMap(), nullptr, &disc, &compilation, song); } if (tag) Decode(tag->comment(), nullptr, song->mutable_comment()); } else if (TagLib::APE::File *file_ape = dynamic_cast(fileref->file())) { - if (file_ape->tag()) { + if (file_ape->APETag()) { ParseAPETag(file_ape->APETag()->itemListMap(), nullptr, &disc, &compilation, song); } song->set_bitdepth(file_ape->audioProperties()->bitsPerSample());