[Digikam-devel] [libkexiv2] libkexiv2: Somehow clicking on the XMP tab in the metadata setup page or in the
Andi Clemens
andi.clemens at gmx.net
Wed Mar 9 13:22:26 GMT 2011
Git commit fa43dbb1272f5523649f251dad7579a5fb836571 by Andi Clemens.
Committed on 09/03/2011 at 14:18.
Pushed by aclemens into branch 'master'.
Somehow clicking on the XMP tab in the metadata setup page or in the
advancedrename tool crashes when digiKam is listing some of my albums. I don't
understand why the setup page has anything to do with the currently opened
album, but anyway:
The iterator here sometimes points on a nullpointer, checking (*it) for NULL
seems to fix the crash.
Anyone has a problem with the patch? Maybe I don't understand the code that
well but at least for me it still works fine.
Andi
CCMAIL:digikam-devel at kde.org
M +1 -2 libkexiv2/kexiv2_p.cpp
http://commits.kde.org/libkexiv2/fa43dbb1272f5523649f251dad7579a5fb836571
diff --git a/libkexiv2/kexiv2_p.cpp b/libkexiv2/kexiv2_p.cpp
index 6acb064..e135e36 100644
--- a/libkexiv2/kexiv2_p.cpp
+++ b/libkexiv2/kexiv2_p.cpp
@@ -399,7 +399,7 @@ int KExiv2::KExiv2Priv::getXMPTagsListFromPrefix(const QString& pf, KExiv2::Tags
for (QList<const Exiv2::XmpPropertyInfo*>::iterator it = tags.begin(); it != tags.end(); ++it)
{
- do
+ while ( (*it) && !QString((*it)->name_).isNull() )
{
QString key = QLatin1String( Exiv2::XmpKey( pf.toAscii().data(), (*it)->name_ ).key().c_str() );
QStringList values;
@@ -408,7 +408,6 @@ int KExiv2::KExiv2Priv::getXMPTagsListFromPrefix(const QString& pf, KExiv2::Tags
++(*it);
i++;
}
- while( !QString((*it)->name_).isNull() );
}
return i;
}
More information about the Digikam-devel
mailing list