mruby-eval: proc from env may be NULL; close #2676

parent ed56d56d
...@@ -28,7 +28,7 @@ get_closure_irep(mrb_state *mrb, int level) ...@@ -28,7 +28,7 @@ get_closure_irep(mrb_state *mrb, int level)
if (!e) return NULL; if (!e) return NULL;
proc = c->cibase[e->cioff].proc; proc = c->cibase[e->cioff].proc;
if (MRB_PROC_CFUNC_P(proc)) { if (!proc || MRB_PROC_CFUNC_P(proc)) {
return NULL; return NULL;
} }
return proc->body.irep; return proc->body.irep;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment