From f493a533befb3f76a03992c1e76c3016da72f135 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 12 Nov 2017 19:19:02 +0100 Subject: Remove complete commands from the completeCommands hash again --- common/resourceaccess.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index fdef6f2..dab6335 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp @@ -125,8 +125,9 @@ void ResourceAccess::Private::abortPendingOperations() void ResourceAccess::Private::callCallbacks() { - for (auto id : completeCommands.keys()) { - const bool success = completeCommands.value(id); + const auto commandIds = completeCommands.keys(); + for (auto id : commandIds) { + const bool success = completeCommands.take(id); // We remove the callbacks first because the handler can kill resourceaccess directly const auto callbacks = resultHandler.values(id); resultHandler.remove(id); -- cgit v1.2.3