Fiber.new{break} caused SEGV

This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-02-05 12:51:17 +09:00
parent be0cc4f90e
commit 04eb577b69
+1 -1
View File
@@ -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;
}