commit | 3914ef863a5e82985f08cb17071d9a1c485863be | [log] [tgz] |
---|---|---|
author | Marcel van Lohuizen <mpvl@golang.org> | Thu Oct 01 15:57:19 2020 +0200 |
committer | Marcel van Lohuizen <mpvl@golang.org> | Sat Oct 03 15:13:25 2020 +0000 |
tree | 67bebbac679b03ff361a279d952255c4d21006b5 | |
parent | 2ac4d850af7a13a3e561ea1bafbcdce05bb616a5 [diff] |
internal/core/eval: check for nil pointer 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>
diff --git a/internal/core/adt/errors.go b/internal/core/adt/errors.go index 5085e28..f29fe53 100644 --- a/internal/core/adt/errors.go +++ b/internal/core/adt/errors.go
@@ -286,6 +286,9 @@ } 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)) }