From 411ad9d4bf3d223eb2eda4baa69253e8c43cc68d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 14 May 2018 15:20:19 +0200 Subject: Using findLatest with an empty uid is an error. Seems to be happening sometimes, so that needs to be fixed once we find the cause. --- common/storage/entitystore.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/storage/entitystore.cpp b/common/storage/entitystore.cpp index baea388..638be6e 100644 --- a/common/storage/entitystore.cpp +++ b/common/storage/entitystore.cpp @@ -483,6 +483,7 @@ void EntityStore::indexLookup(const QByteArray &type, const QByteArray &property void EntityStore::readLatest(const QByteArray &type, const QByteArray &uid, const std::function callback) { Q_ASSERT(d); + Q_ASSERT(!uid.isEmpty()); auto db = DataStore::mainDatabase(d->getTransaction(), type); db.findLatest(uid, [=](const QByteArray &key, const QByteArray &value) { -- cgit v1.2.3