summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusintegrator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus/qdbusintegrator.cpp')
-rw-r--r--src/dbus/qdbusintegrator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 9b0a51107a..22598a2f2d 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1043,6 +1043,10 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate()
"Timer and socket errors will follow and the program will probably crash",
qPrintable(name));
+ closeConnection();
+ rootNode.children.clear(); // free resources
+ qDeleteAll(cachedMetaObjects);
+
if (mode == ClientMode) {
// the bus service object holds a reference back to us;
// we need to destroy it before we finish destroying ourselves
@@ -1052,10 +1056,6 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate()
delete obj;
}
- closeConnection();
- rootNode.children.clear(); // free resources
- qDeleteAll(cachedMetaObjects);
-
if (server)
q_dbus_server_unref(server);
if (connection)