From a6608b57c4035366494a3a1cadd4c457ff2c8118 Mon Sep 17 00:00:00 2001 From: Chris Moeller Date: Tue, 5 Nov 2013 15:37:54 -0800 Subject: [PATCH] Fixed ID3v2 TXXX ReplayGain reading so it will properly skip over text frames with no description field instead of crashing --- Frameworks/TagLib/taglib/taglib/mpeg/id3v2/id3v2tag.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Frameworks/TagLib/taglib/taglib/mpeg/id3v2/id3v2tag.cpp b/Frameworks/TagLib/taglib/taglib/mpeg/id3v2/id3v2tag.cpp index ee9ec6406..0389b6d7c 100644 --- a/Frameworks/TagLib/taglib/taglib/mpeg/id3v2/id3v2tag.cpp +++ b/Frameworks/TagLib/taglib/taglib/mpeg/id3v2/id3v2tag.cpp @@ -196,7 +196,8 @@ float ID3v2::Tag::rg(const String &type) const const FrameList &list = d->frameListMap["TXXX"]; if (!list.isEmpty()) { for (FrameList::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (static_cast(*it)->description() == type) { + UserTextIdentificationFrame const* frame = static_cast(*it); + if (!frame->description().isNull() && frame->description() == type) { return static_cast(*it)->toString().toFloat(); } }