diff --git a/src/rt/rust_shape.h b/src/rt/rust_shape.h index e8a30d5874a8..060dd7fed406 100644 --- a/src/rt/rust_shape.h +++ b/src/rt/rust_shape.h @@ -903,6 +903,8 @@ data::walk_obj_contents(bool align, ptr &dp) { type_desc *subtydesc = *reinterpret_cast(box_ptr + sizeof(void *)); ptr obj_closure_dp(box_ptr + sizeof(void *)); + if (!box_ptr) // Null check. + return; arena arena; type_param *params = type_param::from_obj_shape(subtydesc->shape,