Commit a1d3c638 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Fixed possible crash when computing the AST path.

parent 1519efbe
......@@ -44,7 +44,12 @@ QList<AST *> ASTPath::operator()(int line, int column)
_nodes.clear();
_line = line + 1;
_column = column + 1;
accept(_doc->translationUnit()->ast());
if (_doc) {
if (TranslationUnit *unit = _doc->translationUnit())
accept(unit->ast());
}
return _nodes;
}
......
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