diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-06-26 13:27:11 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-06-26 13:27:11 +0200 |
commit | 5799e3d91a4d929c990cf2569aa2a044515b29d7 (patch) | |
tree | 71e8d98c459d8365eda7d67331b1c06f07c20041 | |
parent | 54a71ef3a3c1ffcf62f71f8a640907b7b6ed6579 (diff) | |
download | sink-5799e3d91a4d929c990cf2569aa2a044515b29d7.tar.gz sink-5799e3d91a4d929c990cf2569aa2a044515b29d7.zip |
Contains with an empty key doesn't make much sense.
-rw-r--r-- | common/pipeline.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<qint64> Pipeline::newEntity(void const *command, size_t size) | |||
133 | QByteArray key; | 133 | QByteArray key; |
134 | if (createEntity->entityId()) { | 134 | if (createEntity->entityId()) { |
135 | key = QByteArray(reinterpret_cast<char const *>(createEntity->entityId()->Data()), createEntity->entityId()->size()); | 135 | key = QByteArray(reinterpret_cast<char const *>(createEntity->entityId()->Data()), createEntity->entityId()->size()); |
136 | if (d->entityStore.contains(bufferType, key)) { | 136 | if (!key.isEmpty() && d->entityStore.contains(bufferType, key)) { |
137 | SinkErrorCtx(d->logCtx) << "An entity with this id already exists: " << key; | 137 | SinkErrorCtx(d->logCtx) << "An entity with this id already exists: " << key; |
138 | return KAsync::error<qint64>(0); | 138 | return KAsync::error<qint64>(0); |
139 | } | 139 | } |