Skip to content

Commit

Permalink
Fix local nill exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Barnabas Kutassy committed Aug 1, 2020
1 parent 8ade3f1 commit 3218561
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion starlark/interp.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ loop:
shEnv = thread.Local("starishEnv").(*Dict)
}
for i := range f.Locals {
if locals[i].Type() != "function" {
if locals[i] != nil && locals[i].Type() != "function" {
shEnv.SetKey(String(f.Locals[i].Name), locals[i])
}
}
Expand Down

0 comments on commit 3218561

Please sign in to comment.