Skip to content

Commit 671365b

Browse files
author
Christian Stenger
committed
CppEditor: Avoid nullptr access
Fixes: QTCREATORBUG-31318 Change-Id: I1728902346ce2f4d7346b71305e2e9d87abf62db Reviewed-by: Christian Kandeler <[email protected]>
1 parent ab7225c commit 671365b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/plugins/cppeditor/typehierarchybuilder.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ void TypeHierarchyBuilder::buildDerived(const std::optional<QFuture<void>> &futu
185185
return;
186186
Document::Ptr doc = snapshot.document(fileName);
187187
if ((_candidates.contains(fileName) && !_candidates.value(fileName).contains(symbolName))
188+
|| !symbol->identifier()
188189
|| !doc->control()->findIdentifier(symbol->identifier()->chars(),
189190
symbol->identifier()->size())) {
190191
continue;

0 commit comments

Comments
 (0)