Commit 8df63b4d authored by cremno's avatar cremno

check `mrb_open` return value

parent 835da83c
......@@ -96,6 +96,10 @@ main(int argc, char **argv)
}
mrb = mrb_open();
if (mrb == NULL) {
fputs("Invalid mrb_state, exiting mruby-strip\n", stderr);
return EXIT_FAILURE;
}
ireps = (mrb_irep**)malloc(sizeof(mrb_irep*) * argc);
for (i = args_result; i < argc; ++i) {
......
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