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:
@@ -2292,6 +2292,11 @@ main()
|
||||
mrb_state *mrb = mrb_open();
|
||||
int n;
|
||||
|
||||
if (mrb == NULL) {
|
||||
fprintf(stderr, "Invalid mrb_state, exiting codegen test");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
#if 1
|
||||
n = mrb_compile_string(mrb, "p(__FILE__)\np(__LINE__)");
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user