From 5799e3d91a4d929c990cf2569aa2a044515b29d7 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 26 Jun 2018 13:27:11 +0200 Subject: Contains with an empty key doesn't make much sense. --- common/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/pipeline.cpp b/common/pipeline.cpp index 581e661..feb16e3 100644 --- a/common/pipeline.cpp +++ b/common/pipeline.cpp @@ -133,7 +133,7 @@ KAsync::Job Pipeline::newEntity(void const *command, size_t size) QByteArray key; if (createEntity->entityId()) { key = QByteArray(reinterpret_cast(createEntity->entityId()->Data()), createEntity->entityId()->size()); - if (d->entityStore.contains(bufferType, key)) { + if (!key.isEmpty() && d->entityStore.contains(bufferType, key)) { SinkErrorCtx(d->logCtx) << "An entity with this id already exists: " << key; return KAsync::error(0); } -- cgit v1.2.3