Commit b570e279 authored by David Faure's avatar David Faure

Fix assert in CollectionFetchJob when cols is empty.

If Akonadi::PersistentSearchAttribute::queryCollections() returns
an empty list of collections, this code would assert.

REVIEW: 128347
parent 6e967df4
......@@ -85,6 +85,9 @@ void SearchCollectionIndexingWarning::setCollection(const Akonadi::Collection &c
Q_FOREACH (qint64 col, attr->queryCollections()) {
cols.push_back(Akonadi::Collection(col));
}
if (cols.isEmpty()) {
return;
}
// First retrieve the top-level collections
Akonadi::CollectionFetchJob *fetch = fetchCollections(cols, false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment