diff options
author | Liang Qi <liang.qi@qt.io> | 2018-12-04 09:58:43 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-12-04 09:58:43 +0100 |
commit | 5d5c00c67682bce105197b659687fd1fee8f60cf (patch) | |
tree | 686e41dc3ea121235fb73afb9157ed603f1bfeff /src/dbus/qdbusintegrator.cpp | |
parent | f213e818f03d35cb82e3daf187415197fd156f8e (diff) | |
parent | b82559244e2dc03f1ceff66bb67630df4300dc7c (diff) | |
download | qtbase-5d5c00c67682bce105197b659687fd1fee8f60cf.tar.gz |
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
src/gui/painting/qdrawhelper.cpp
Change-Id: I4916e07b635e1d3830e9b46ef7914f99bec3098e
Diffstat (limited to 'src/dbus/qdbusintegrator.cpp')
-rw-r--r-- | src/dbus/qdbusintegrator.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index cee5c821c8..1125480447 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -1070,10 +1070,11 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate() "Timer and socket errors will follow and the program will probably crash", qPrintable(name)); + auto lastMode = mode; // reset on connection close closeConnection(); qDeleteAll(cachedMetaObjects); - if (mode == ClientMode || mode == PeerMode) { + if (lastMode == ClientMode || lastMode == PeerMode) { // the bus service object holds a reference back to us; // we need to destroy it before we finish destroying ourselves Q_ASSERT(ref.load() == 0); @@ -1085,7 +1086,7 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate() if (connection) q_dbus_connection_unref(connection); connection = 0; - } else if (mode == ServerMode) { + } else if (lastMode == ServerMode) { if (server) q_dbus_server_unref(server); server = 0; |