LanguageClient: Do not handle messages while shutting down

Fixes crash of todays demo...

Change-Id: I0af3edd098b5c05d7d74ff336739f1180a1ec348
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2021-02-19 12:31:33 +01:00
parent 30e1387130
commit 2fe3ce93ae

View File

@@ -134,6 +134,9 @@ Client::~Client()
for (IAssistProcessor *processor : qAsConst(m_runningAssistProcessors)) for (IAssistProcessor *processor : qAsConst(m_runningAssistProcessors))
processor->setAsyncProposalAvailable(nullptr); processor->setAsyncProposalAvailable(nullptr);
updateEditorToolBar(m_openedDocument.keys()); updateEditorToolBar(m_openedDocument.keys());
// do not handle messages while shutting down
disconnect(m_clientInterface.data(), &BaseClientInterface::messageReceived,
this, &Client::handleMessage);
} }
static ClientCapabilities generateClientCapabilities() static ClientCapabilities generateClientCapabilities()