summaryrefslogtreecommitdiffstats
path: root/byterun/weak.c
diff options
context:
space:
mode:
Diffstat (limited to 'byterun/weak.c')
-rw-r--r--byterun/weak.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/byterun/weak.c b/byterun/weak.c
index e85468601..c6c4a223f 100644
--- a/byterun/weak.c
+++ b/byterun/weak.c
@@ -70,7 +70,7 @@ CAMLprim value caml_weak_set (value ar, value n, value el)
if (offset < 1 || offset >= Wosize_val (ar)){
caml_invalid_argument ("Weak.set");
}
- if (el != None_val){
+ if (el != None_val && Is_block (el)){
Assert (Wosize_val (el) == 1);
do_set (ar, offset, Field (el, 0));
}else{