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

Check for possible 0x0 access.

parent 27141eb6
Branches
Tags
No related merge requests found
......@@ -443,7 +443,7 @@ public:
// show when we're on the 'if' of an if statement
int index = path.size() - 1;
IfStatementAST *ifStatement = path.at(index)->asIfStatement();
if (ifStatement && isCursorOn(ifStatement->if_token)
if (ifStatement && isCursorOn(ifStatement->if_token) && ifStatement->statement
&& ! ifStatement->statement->asCompoundStatement()) {
_statement = ifStatement->statement;
return index;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment