summaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index efc135e0..4d19fedf 100644
--- a/gc.c
+++ b/gc.c
@@ -189,7 +189,7 @@ tail_call:
#define mark_obj_tail(o) return mark_obj(o)
#endif
- if (obj == nil)
+ if (!is_ptr(obj))
return;
t = obj->t.type;
@@ -380,7 +380,7 @@ int gc_is_reachable(obj_t *obj)
{
type_t t;
- if (obj == nil)
+ if (!is_ptr(obj))
return 1;
t = obj->t.type;