summaryrefslogtreecommitdiffhomepage
path: root/types.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-08-24 15:55:35 +0200
committerGitHub <noreply@github.com>2022-08-24 15:55:35 +0200
commit66bbda7fdc5dfdc1b0ed587a4f8cfc72b1c34a3b (patch)
tree0a089858e2f2fbf2c19440be8dda7e945667d83b /types.c
parent796a9471bfe69007678d83ba279f9b24cfd17ec1 (diff)
parent131d99c45e586e06d2fa3adba32e92c0370ad022 (diff)
Merge pull request #101 from jow-/loadfile-support
lib: introduce three new functions call(), loadstring() and loadfile()
Diffstat (limited to 'types.c')
-rw-r--r--types.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/types.c b/types.c
index e05d685..5274d23 100644
--- a/types.c
+++ b/types.c
@@ -266,7 +266,8 @@ ucv_free(uc_value_t *uv, bool retain)
ref = &closure->ref;
for (i = 0; i < function->nupvals; i++)
- ucv_put_value(&closure->upvals[i]->header, retain);
+ if (closure->upvals[i])
+ ucv_put_value(&closure->upvals[i]->header, retain);
ucv_put_value(&function->program->header, retain);
break;