From fca6857529f9be982a75cd055fdc01e8d34413fb Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 29 Nov 2016 15:35:59 +0100 Subject: 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 Reviewed-by: Simon Hausmann --- src/qml/debugger/qqmldebugconnector.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/qml/debugger') 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; } -- cgit v1.2.3