Memory leak when trying to retrieve cover art

Lukáš Lalinský lalinsky at gmail.com
Sat Dec 18 00:09:33 CET 2010


On Fri, Dec 17, 2010 at 11:58 PM, Fernando Valente
<fernando at fvalente.org> wrote:
> TagLib::ID3v2::FrameList l = t->frameListMap()["APIC"];
> TagLib::ID3v2::AttachedPictureFrame *pic =
> static_cast<TagLib::ID3v2::AttachedPictureFrame *> (l.front());

You need to check whether the FrameList instance is not empty using
l.isEmpty() and skip some of the following code if it is.

Lukas


More information about the taglib-devel mailing list