aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-11-29 15:35:59 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2016-11-30 08:30:40 +0000
commitfca6857529f9be982a75cd055fdc01e8d34413fb (patch)
tree0338866d6a52fe12373b8ce60045c9e1a22c2e67 /src/qml/debugger
parent4b210353e6e35368bc2411bc16157c8984cc46cc (diff)
Make sure we cannot reload debug connectors on shutdown
The various Q_GLOBAL_STATICs involved in the loading of debug plugins may be destroyed in any order. If the connector is unloaded before the services, it might get reloaded when one service calls instance(), trying to deregister itself. Prevent this by clearing all the parameters. Change-Id: Iee4a05e09401be916f0339d72eb8b5f2c9eac55d Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/debugger')
-rw-r--r--src/qml/debugger/qqmldebugconnector.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/debugger/qqmldebugconnector.cpp b/src/qml/debugger/qqmldebugconnector.cpp
index 23440e7529..dd34bb910f 100644
--- a/src/qml/debugger/qqmldebugconnector.cpp
+++ b/src/qml/debugger/qqmldebugconnector.cpp
@@ -152,7 +152,10 @@ QQmlDebugConnectorFactory::~QQmlDebugConnectorFactory()
{
// This is triggered when the plugin is unloaded.
QQmlDebugConnectorParams *params = qmlDebugConnectorParams();
- if (params && params->instance) {
+ if (params) {
+ params->pluginKey.clear();
+ params->arguments.clear();
+ params->services.clear();
delete params->instance;
params->instance = 0;
}