diff options
| author | Tatsuhiko Kubo <[email protected]> | 2014-08-20 05:48:09 +0900 |
|---|---|---|
| committer | Tatsuhiko Kubo <[email protected]> | 2014-08-20 05:48:09 +0900 |
| commit | effc44f265c19d25545e01b94831631c3a5bef5f (patch) | |
| tree | 6bd1025c303e8016477caa75e74f54e57572c121 /test | |
| parent | d49f8517a6d2350eb1ed2642749f3994a9a2d056 (diff) | |
| download | mruby-effc44f265c19d25545e01b94831631c3a5bef5f.tar.gz mruby-effc44f265c19d25545e01b94831631c3a5bef5f.zip | |
Fix error handlings for mrb_open_core().
Diffstat (limited to 'test')
| -rw-r--r-- | test/init_mrbtest.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/init_mrbtest.c b/test/init_mrbtest.c index 2a32f4930..1e2ba92bd 100644 --- a/test/init_mrbtest.c +++ b/test/init_mrbtest.c @@ -18,6 +18,10 @@ mrb_init_mrbtest(mrb_state *mrb) mrb_load_irep(mrb, mrbtest_assert_irep); core_test = mrb_open_core(mrb_default_allocf, NULL); + if (core_test == NULL) { + fprintf(stderr, "Invalid mrb_state, exiting %s", __FUNCTION__); + exit(EXIT_FAILURE); + } mrb_init_test_driver(core_test, mrb_test(mrb_gv_get(mrb, mrb_intern_lit(mrb, "$mrbtest_verbose")))); mrb_load_irep(core_test, mrbtest_assert_irep); mrb_load_irep(core_test, mrbtest_irep); |
