aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2018-12-05 07:49:05 +0100
committerDavid Schulz <david.schulz@qt.io>2018-12-05 07:34:09 +0000
commit257df2e4b8ca6d3e3407e0f4d5ee1ecbde965652 (patch)
tree7e6583e79d2a96ca60da340bfb4e2f06036a24c2
parentc975f2f3eae0ce4b94c07c63ffd737a17ed4c3c3 (diff)
LSP: fix crash after last server restart attempt
The client got indirectly deleted from the manager while still in the parsing output function during the last restart attempt. Fixing it by freeing the client via deleteLater. Change-Id: I2539a8b96b5568dc2ae15a6bfe4f2ab02c280f67 Fixes: QTCREATORBUG-21635 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/plugins/languageclient/languageclientmanager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/languageclient/languageclientmanager.cpp b/src/plugins/languageclient/languageclientmanager.cpp
index bae73aec0b..a282282f6d 100644
--- a/src/plugins/languageclient/languageclientmanager.cpp
+++ b/src/plugins/languageclient/languageclientmanager.cpp
@@ -205,10 +205,10 @@ void LanguageClientManager::reportFinished(const MessageId &id, BaseClient *byCl
void LanguageClientManager::deleteClient(BaseClient *client)
{
QTC_ASSERT(client, return);
- client->disconnect(managerInstance);
+ client->disconnect();
managerInstance->removeMarks(client->id());
managerInstance->m_clients.removeAll(client);
- delete client;
+ client->deleteLater();
}
void LanguageClientManager::shutdown()