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
@@ -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\