Add safety check so we don't insert empty icons.

This commit is contained in:
Felix Geyer 2013-04-07 19:37:44 +02:00
parent 5a96e19ce9
commit fe42861bed

View File

@ -353,7 +353,7 @@ void Metadata::copyCustomIcons(const QSet<Uuid>& iconList, const Metadata* other
Q_FOREACH (const Uuid& uuid, iconList) { Q_FOREACH (const Uuid& uuid, iconList) {
Q_ASSERT(otherMetadata->containsCustomIcon(uuid)); Q_ASSERT(otherMetadata->containsCustomIcon(uuid));
if (!containsCustomIcon(uuid)) { if (!containsCustomIcon(uuid) && otherMetadata->containsCustomIcon(uuid)) {
addCustomIcon(uuid, otherMetadata->customIcon(uuid)); addCustomIcon(uuid, otherMetadata->customIcon(uuid));
} }
} }