From: Scott Wheeler Date: Tue, 17 May 2005 21:27:51 +0000 (+0000) Subject: Check to make sure that there's content before trying to return it. X-Git-Tag: v1.5~286 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10d8a4deacc4a84ec04ec2d764355b49327f3e9d;p=taglib Check to make sure that there's content before trying to return it. Almost the same as a patch from Clemens Fuchslocher CCMAIL:clemens@allesdurcheinander.de git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@415211 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- diff --git a/ape/apeitem.cpp b/ape/apeitem.cpp index 7f364241..b65232db 100644 --- a/ape/apeitem.cpp +++ b/ape/apeitem.cpp @@ -116,7 +116,7 @@ StringList APE::Item::toStringList() const String APE::Item::toString() const { - return d->text.front(); + return isEmpty() ? String::null : d->text.front(); } bool APE::Item::isEmpty() const