mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Check mrb_open return value for NULL
This commit is contained in:
@@ -5518,6 +5518,11 @@ main()
|
||||
mrb_state *mrb = mrb_open();
|
||||
int n;
|
||||
|
||||
if (mrb == NULL) {
|
||||
fprintf(stderr, "Invalid mrb_state, exiting parser test");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
n = mrb_compile_string(mrb, "\
|
||||
def fib(n)\n\
|
||||
if n<2\n\
|
||||
|
||||
Reference in New Issue
Block a user