Check mrb_open return value for NULL

This commit is contained in:
Jon
2012-06-03 10:04:51 -04:00
parent 49aa42f3a9
commit 2fff59dc86
7 changed files with 70 additions and 0 deletions
+5
View File
@@ -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