Commit 458f59ee authored by Allen Winter's avatar Allen Winter

kmkernel.cpp - collect_collections() skip invalid indexes

Differential Revision: https://phabricator.kde.org/D7238
parent cf2f436b
......@@ -1411,9 +1411,9 @@ static Akonadi::Collection::List collect_collections(const QAbstractItemModel *m
const auto idx = stack.pop();
if (idx.isValid()) {
collections << model->data(idx, Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
}
for (int i = model->rowCount(idx) - 1; i >= 0; --i) {
stack.push(idx.child(i, 0));
for (int i = model->rowCount(idx) - 1; i >= 0; --i) {
stack.push(idx.child(i, 0));
}
}
}
......
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