Skip to content

Commit

Permalink
Add null check to ifWithEmptyThen path, consistent with ifWithNonEmpt…
Browse files Browse the repository at this point in the history
…hThen path
  • Loading branch information
tommy9 committed Jan 27, 2024
1 parent 411d825 commit c7b7d38
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,10 @@ public void Resolve(VBAParser.SingleLineIfStmtContext context)
if (context.ifWithEmptyThen() != null)
{
ResolveDefault(context.ifWithEmptyThen().booleanExpression());
ResolveListOrLabel(context.ifWithEmptyThen().singleLineElseClause().listOrLabel());
if (context.ifWithEmptyThen().singleLineElseClause() != null)
{
ResolveListOrLabel(context.ifWithEmptyThen().singleLineElseClause().listOrLabel());
}
}
else
{
Expand Down

0 comments on commit c7b7d38

Please sign in to comment.