forked from qt-creator/qt-creator
Editor: Fix crash in codeassist
We have to report back to the code assistant even if we have no results. Otherwise the processors aren't correctly reset and may be called after deletion. Change-Id: Id7af2e0ee9f631efc00beb2a84bfe1824e138d24 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -215,8 +215,11 @@ void ClangCompletionAssistProcessor::handleAvailableCompletions(const CodeComple
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_fallbackToNormalCompletion)
|
||||
if (!m_fallbackToNormalCompletion) {
|
||||
// We must report back to the code assistant under all circumstances
|
||||
setAsyncProposalAvailable(nullptr);
|
||||
return;
|
||||
}
|
||||
// else: Proceed with a normal completion in case:
|
||||
// 1) it was not a function call, but e.g. a function declaration like "void f("
|
||||
// 2) '{' meant not a constructor call.
|
||||
|
||||
Reference in New Issue
Block a user