forked from qt-creator/qt-creator
ClangCodeModel: prevent accessing nullptr
There is a certain amount of time between resetting the processor to nullptr in ClangdFollowSymbol::VirtualFunctionAssistProcessor::cancel and the destruction of the ClangdFollowSymbol sentinel. So we also need to check the processor before calling update. Task-number: QTCREATORBUG-28769 Change-Id: Idec7c9dd7648285ecf2360c309d9751303f6209c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -453,7 +453,7 @@ void ClangdFollowSymbol::Private::handleGotoImplementationResult(
|
|||||||
const QString &name, const QString &prefix, const MessageId &reqId) {
|
const QString &name, const QString &prefix, const MessageId &reqId) {
|
||||||
qCDebug(clangdLog) << "handling symbol info reply"
|
qCDebug(clangdLog) << "handling symbol info reply"
|
||||||
<< link.targetFilePath.toUserOutput() << link.targetLine;
|
<< link.targetFilePath.toUserOutput() << link.targetLine;
|
||||||
if (!sentinel)
|
if (!sentinel || !virtualFuncAssistProcessor)
|
||||||
return;
|
return;
|
||||||
if (!name.isEmpty())
|
if (!name.isEmpty())
|
||||||
symbolsToDisplay.push_back({prefix + name, link});
|
symbolsToDisplay.push_back({prefix + name, link});
|
||||||
|
Reference in New Issue
Block a user