Skip to content

Commit

Permalink
Also fix panic bug when an arg is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
CannibalVox committed Apr 10, 2020
1 parent 58ef854 commit 24969c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion local_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (f *LocalLuaFunction) Call(args ...interface{}) ([]interface{}, error) {
if err != nil {
break
}
if val.temporary == C._Bool(true) {
if val != nil && val.temporary == C._Bool(true) {
defer C.free_temporary_lua_value(f.HomeVM()._l, val)
}

Expand Down

0 comments on commit 24969c9

Please sign in to comment.