Fiber.new{break} caused SEGV

parent be0cc4f9
......@@ -1350,7 +1350,7 @@ mrb_context_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int
ci = mrb->c->ci;
break;
case OP_R_BREAK:
if (proc->env->cioff < 0) {
if (!proc->env || proc->env->cioff < 0) {
localjump_error(mrb, LOCALJUMP_ERROR_BREAK);
goto L_RAISE;
}
......
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