summaryrefslogtreecommitdiffstats
path: root/common/storage_lmdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/storage_lmdb.cpp')
-rw-r--r--common/storage_lmdb.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp
index bede6aa..b7fbfed 100644
--- a/common/storage_lmdb.cpp
+++ b/common/storage_lmdb.cpp
@@ -218,6 +218,11 @@ bool Storage::write(void const *keyPtr, size_t keySize, void const *valuePtr, si
218 return false; 218 return false;
219 } 219 }
220 220
221 if (!keyPtr || keySize == 0) {
222 std::cerr << "tried to write empty key." << std::endl;
223 return false;
224 }
225
221 const bool implicitTransaction = !d->transaction || d->readTransaction; 226 const bool implicitTransaction = !d->transaction || d->readTransaction;
222 if (implicitTransaction) { 227 if (implicitTransaction) {
223 if (!startTransaction()) { 228 if (!startTransaction()) {