vm.c (eval_under): check if irep is NULL; fix #6065

This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-09-28 11:37:07 +09:00
parent 0e98508c33
commit d298da8e72
+2
View File
@@ -898,6 +898,8 @@ eval_under(mrb_state *mrb, mrb_value self, mrb_value blk, struct RClass *c)
}
ci->u.target_class = c;
p = mrb_proc_ptr(blk);
/* just in case irep is NULL; #6065 */
if (p->body.irep == NULL) return mrb_nil_value();
CI_PROC_SET(ci, p);
ci->n = 1;
ci->nk = 0;