Commit f4570d41 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2301 from mimaki/fix-load-mrb-segv

mrb_load_irep_file() caused SEGV
parents a11f994e e52f1bd7
...@@ -814,7 +814,7 @@ mrb_load_irep_file_cxt(mrb_state *mrb, FILE* fp, mrbc_context *c) ...@@ -814,7 +814,7 @@ mrb_load_irep_file_cxt(mrb_state *mrb, FILE* fp, mrbc_context *c)
} }
proc = mrb_proc_new(mrb, irep); proc = mrb_proc_new(mrb, irep);
mrb_irep_decref(mrb, irep); mrb_irep_decref(mrb, irep);
if (c->dump_result) mrb_codedump_all(mrb, proc); if (c && c->dump_result) mrb_codedump_all(mrb, proc);
if (c && c->no_exec) return mrb_obj_value(proc); if (c && c->no_exec) return mrb_obj_value(proc);
val = mrb_toplevel_run(mrb, proc); val = mrb_toplevel_run(mrb, proc);
return val; return val;
......
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