mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
vm.c (catch_handler_find): check if irep is NULL; fix #6052
This commit is contained in:
@@ -1111,7 +1111,7 @@ catch_handler_find(mrb_state *mrb, mrb_callinfo *ci, const mrb_code *pc, uint32_
|
||||
|
||||
if (ci->proc == NULL || MRB_PROC_CFUNC_P(ci->proc)) return NULL;
|
||||
irep = ci->proc->body.irep;
|
||||
if (irep->clen < 1) return NULL;
|
||||
if (irep == NULL || irep->clen < 1) return NULL;
|
||||
xpc = pc - irep->iseq;
|
||||
/* If it retry at the top level, pc will be 0, so check with -1 as the start position */
|
||||
mrb_assert(catch_cover_p(xpc, -1, irep->ilen));
|
||||
|
||||
Reference in New Issue
Block a user