From 7a7419a3f482a6f85173b00dee8f571806296b1c Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 24 Apr 2017 16:16:00 +0000 Subject: [PATCH] Prevent null ref --- include/cyclone/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cyclone/types.h b/include/cyclone/types.h index 1262cb7b..6ee4b688 100644 --- a/include/cyclone/types.h +++ b/include/cyclone/types.h @@ -1043,7 +1043,7 @@ typedef union { #define return_copy(ptr, obj) \ { \ tag_type t; \ - if (is_value_type(obj)) \ + if (!is_object_type(obj)) \ return obj; \ t = type_of(obj); \ if (t == boolean_tag || /* Pre-allocated */ \