From fe42861bedc52b426d247932ca02a28b894b8f44 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Sun, 7 Apr 2013 19:37:44 +0200 Subject: [PATCH] Add safety check so we don't insert empty icons. --- src/core/Metadata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Metadata.cpp b/src/core/Metadata.cpp index 105ad14d2..5947255e5 100644 --- a/src/core/Metadata.cpp +++ b/src/core/Metadata.cpp @@ -353,7 +353,7 @@ void Metadata::copyCustomIcons(const QSet& iconList, const Metadata* other Q_FOREACH (const Uuid& uuid, iconList) { Q_ASSERT(otherMetadata->containsCustomIcon(uuid)); - if (!containsCustomIcon(uuid)) { + if (!containsCustomIcon(uuid) && otherMetadata->containsCustomIcon(uuid)) { addCustomIcon(uuid, otherMetadata->customIcon(uuid)); } }