Skip to content
Snippets Groups Projects
Commit a1d3c638 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Fixed possible crash when computing the AST path.

parent 1519efbe
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,12 @@ QList<AST *> ASTPath::operator()(int line, int column) ...@@ -44,7 +44,12 @@ QList<AST *> ASTPath::operator()(int line, int column)
_nodes.clear(); _nodes.clear();
_line = line + 1; _line = line + 1;
_column = column + 1; _column = column + 1;
accept(_doc->translationUnit()->ast());
if (_doc) {
if (TranslationUnit *unit = _doc->translationUnit())
accept(unit->ast());
}
return _nodes; return _nodes;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment