diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-08-11 23:51:29 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-08-11 23:51:29 +0200 |
commit | b9bd0d1b392cbafceb425b23ac080522eedafa5c (patch) | |
tree | f42a79438333bd2c9b0586b0c58392388f05bd32 | |
parent | 65817a81d040285fb654e865053d87a1c1d33792 (diff) | |
download | sink-b9bd0d1b392cbafceb425b23ac080522eedafa5c.tar.gz sink-b9bd0d1b392cbafceb425b23ac080522eedafa5c.zip |
Error on remove without transaction
-rw-r--r-- | common/storage_lmdb.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp index c02d523..23df0fc 100644 --- a/common/storage_lmdb.cpp +++ b/common/storage_lmdb.cpp | |||
@@ -227,7 +227,7 @@ int Storage::Transaction::scan(const QByteArray &k, | |||
227 | void Storage::Transaction::remove(const QByteArray &k, | 227 | void Storage::Transaction::remove(const QByteArray &k, |
228 | const std::function<void(const Storage::Error &error)> &errorHandler) | 228 | const std::function<void(const Storage::Error &error)> &errorHandler) |
229 | { | 229 | { |
230 | if (!d) { | 230 | if (!d || !d->transaction) { |
231 | Error error(d->name.toLatin1(), ErrorCodes::GenericError, "Not open"); | 231 | Error error(d->name.toLatin1(), ErrorCodes::GenericError, "Not open"); |
232 | errorHandler ? errorHandler(error) : d->defaultErrorHandler(error); | 232 | errorHandler ? errorHandler(error) : d->defaultErrorHandler(error); |
233 | return; | 233 | return; |