Skip to content
Snippets Groups Projects
Commit d2e7f8e4 authored by Christian Kamm's avatar Christian Kamm
Browse files

Quickfix: Don't crash when the AST path is empty.

parent e237036e
No related branches found
No related tags found
No related merge requests found
......@@ -275,6 +275,9 @@ public:
virtual int match(const QList<AST *> &path)
{
if (path.size() == 0)
return -1;
// show when we're on the 'if' of an if statement
int index = path.size() - 1;
IfStatementAST *ifStatement = path.at(index)->asIfStatement();
......
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