From f0fa3392133e15d68245d88397d5c43023b84b43 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 7 Oct 2016 15:40:17 +0200 Subject: Detect when we try to operate on transactions that point to a non-existing env. ...which happens if we remove the env while transactions are open. --- common/messagequeue.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common/messagequeue.cpp') diff --git a/common/messagequeue.cpp b/common/messagequeue.cpp index 54aaf8c..e050bcd 100644 --- a/common/messagequeue.cpp +++ b/common/messagequeue.cpp @@ -11,6 +11,9 @@ MessageQueue::MessageQueue(const QString &storageRoot, const QString &name) : mS MessageQueue::~MessageQueue() { + if (mWriteTransaction) { + mWriteTransaction.abort(); + } } void MessageQueue::enqueue(void const *msg, size_t size) -- cgit v1.2.3