Commit 94747ea2 authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppTools: Guard against invalid document

Change-Id: Ib6fcdc312fcfa558cd7e1e55c46cb84c002258ad
Reviewed-by: default avatarhjk <>
parent e59874f5
......@@ -358,6 +358,9 @@ QFuture<CursorInfo> BuiltinCursorInfo::run(const CursorInfoParams &cursorInfoPar
BuiltinCursorInfo::findLocalUses(const Document::Ptr &document, int line, int column)
if (!document || !document->translationUnit() || !document->translationUnit()->ast())
return SemanticInfo::LocalUseMap();
AST *ast = document->translationUnit()->ast();
FunctionDefinitionUnderCursor functionDefinitionUnderCursor(document->translationUnit());
DeclarationAST *declaration = functionDefinitionUnderCursor(ast,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment