Skip to content

Commit c7b7d38

Browse files
committed
Add null check to ifWithEmptyThen path, consistent with ifWithNonEmpthThen path
1 parent 411d825 commit c7b7d38

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Rubberduck.Parsing/VBA/ReferenceManagement/IdentifierReferenceResolver.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,10 @@ public void Resolve(VBAParser.SingleLineIfStmtContext context)
321321
if (context.ifWithEmptyThen() != null)
322322
{
323323
ResolveDefault(context.ifWithEmptyThen().booleanExpression());
324-
ResolveListOrLabel(context.ifWithEmptyThen().singleLineElseClause().listOrLabel());
324+
if (context.ifWithEmptyThen().singleLineElseClause() != null)
325+
{
326+
ResolveListOrLabel(context.ifWithEmptyThen().singleLineElseClause().listOrLabel());
327+
}
325328
}
326329
else
327330
{

0 commit comments

Comments
 (0)