Skip to content

Commit

Permalink
internal/core/eval: check for nil pointer
Browse files Browse the repository at this point in the history
Change-Id: I41cfa447296cd0928e69ee52f3cbc790421c6089
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7321
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
  • Loading branch information
mpvl committed Oct 3, 2020
1 parent 2ac4d85 commit 3914ef8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/core/adt/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ func (e *ValueError) InputPositions() (a []token.Pos) {
}

func (e *ValueError) Path() (a []string) {
if e.v == nil {
return nil
}
for _, f := range appendPath(nil, e.v) {
a = append(a, f.SelectorString(e.r))
}
Expand Down

0 comments on commit 3914ef8

Please sign in to comment.