summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbusintegrator.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 59b46f3e4a..5acc3448bf 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1138,7 +1138,13 @@ void QDBusConnectionPrivate::closeConnection()
}
}
- qDeleteAll(pendingCalls);
+ for (auto it = pendingCalls.begin(); it != pendingCalls.end(); ++it) {
+ auto call = *it;
+ if (!call->ref.deref()) {
+ delete call;
+ }
+ }
+ pendingCalls.clear();
// Disconnect all signals from signal hooks and from the object tree to
// avoid QObject::destroyed being sent to dbus daemon thread which has