mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
protect crash from empty irep
This commit is contained in:
@@ -788,6 +788,10 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
|
||||
/* setup environment for calling method */
|
||||
proc = m;
|
||||
irep = m->body.irep;
|
||||
if (!irep) {
|
||||
mrb->stack[0] = mrb_nil_value();
|
||||
goto L_RETURN;
|
||||
}
|
||||
pool = irep->pool;
|
||||
syms = irep->syms;
|
||||
ci->nregs = irep->nregs;
|
||||
|
||||
Reference in New Issue
Block a user