diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-29 15:35:59 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2016-11-30 08:30:40 +0000 |
commit | fca6857529f9be982a75cd055fdc01e8d34413fb (patch) | |
tree | 0338866d6a52fe12373b8ce60045c9e1a22c2e67 /src/qml/debugger/qqmldebugconnector.cpp | |
parent | 4b210353e6e35368bc2411bc16157c8984cc46cc (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/qqmldebugconnector.cpp')
-rw-r--r-- | src/qml/debugger/qqmldebugconnector.cpp | 5 |
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; } |