From 5eb17e7eab0cbbed0f7b7df84d745f228446703d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sat, 26 Dec 2015 21:38:45 +0100 Subject: Don't try to index stuff that isn't available --- common/typeindex.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'common/typeindex.cpp') diff --git a/common/typeindex.cpp b/common/typeindex.cpp index 1e41267..e9a0f79 100644 --- a/common/typeindex.cpp +++ b/common/typeindex.cpp @@ -62,7 +62,9 @@ void TypeIndex::addProperty(const QByteArray &property) { auto indexer = [this, property](const QByteArray &identifier, const QVariant &value, Akonadi2::Storage::Transaction &transaction) { // Trace() << "Indexing " << mType + ".index." + property << value.toByteArray(); - Index(mType + ".index." + property, transaction).add(value.toByteArray(), identifier); + if (value.isValid()) { + Index(mType + ".index." + property, transaction).add(value.toByteArray(), identifier); + } }; mIndexer.insert(property, indexer); mProperties << property; -- cgit v1.2.3