summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index fbc44315..64dfb7d0 100644
--- a/lib.c
+++ b/lib.c
@@ -183,7 +183,8 @@ val type_check3(val obj, int t1, int t2, int t3)
val class_check(val cobj, val class_sym)
{
- type_assert (cobj && cobj->t.type == COBJ && cobj->co.cls == class_sym,
+ type_assert (is_ptr(cobj) && cobj->t.type == COBJ &&
+ cobj->co.cls == class_sym,
(lit("~a is not of type ~a"), cobj, class_sym, nao));
return t;
}