summaryrefslogtreecommitdiffhomepage
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/types.c b/types.c
index 98547e3..5808d8e 100644
--- a/types.c
+++ b/types.c
@@ -1763,6 +1763,10 @@ ucv_gc(uc_vm_t *vm, bool final)
uc_value_t *val;
size_t i;
+ /* back out early if value list is uninitialized */
+ if (!vm->values.prev || !vm->values.next)
+ return;
+
if (!final) {
/* mark reachable objects */
ucv_gc_mark(vm->globals);