From 755de9f86adf5b05e6af43aa4b32844389ac0322 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 14 May 2020 08:18:32 +0200 Subject: [PATCH] Editor: delete processor after canceling Set a null proposal has the potential to restart the processor in combination with the invalidateCurrentRequestData from this cancelCurrentRequest will result in a restarted processor that is not tracked via m_asyncProcessor. Change-Id: Ia0e0d49564170a1e705994933d07e00c23f24f5d Reviewed-by: Christian Stenger --- src/plugins/texteditor/codeassist/codeassistant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/texteditor/codeassist/codeassistant.cpp b/src/plugins/texteditor/codeassist/codeassistant.cpp index 3c61903f0d0..ce90f64b482 100644 --- a/src/plugins/texteditor/codeassist/codeassistant.cpp +++ b/src/plugins/texteditor/codeassist/codeassistant.cpp @@ -292,7 +292,7 @@ void CodeAssistantPrivate::cancelCurrentRequest() } if (m_asyncProcessor) { m_asyncProcessor->cancel(); - m_asyncProcessor->setAsyncProposalAvailable(nullptr); + delete m_asyncProcessor; } invalidateCurrentRequestData(); }