Skip to content

Commit

Permalink
Check for nil in linter
Browse files Browse the repository at this point in the history
  • Loading branch information
5nord committed Apr 21, 2023
1 parent d43ebb9 commit d16d3ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@ func checkBraces(left syntax.Node, right syntax.Node) {
return
}

if left == nil || right == nil {
return
}

p1 := syntax.Begin(left)
p2 := syntax.Begin(right)
if p1.Line != p2.Line && p1.Column != p2.Column {
Expand Down

0 comments on commit d16d3ad

Please sign in to comment.