diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-08-20 09:25:33 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-08-20 09:25:33 +0900 |
| commit | bceaade168c8fecab960c76df5a797b5009e90be (patch) | |
| tree | 994f779762a06485581a73084f78bec85924bbcf /src | |
| parent | 28cf769a6e699bdc85a868f05cf1ea9382a56d97 (diff) | |
| parent | 53a7549e1c0dd9a189ac40804b2f5f3e600c9e76 (diff) | |
| download | mruby-bceaade168c8fecab960c76df5a797b5009e90be.tar.gz mruby-bceaade168c8fecab960c76df5a797b5009e90be.zip | |
Merge pull request #2543 from cubicdaiya/issues/mrb_open_allocf_error_handlings
Fix error handling for mrb_open_allocf().
Diffstat (limited to 'src')
| -rw-r--r-- | src/state.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/state.c b/src/state.c index 9c16524f2..8d6993b6f 100644 --- a/src/state.c +++ b/src/state.c @@ -110,6 +110,10 @@ mrb_open_allocf(mrb_allocf f, void *ud) { mrb_state *mrb = mrb_open_core(f, ud); + if (mrb == NULL) { + return NULL; + } + #ifndef DISABLE_GEMS mrb_init_mrbgems(mrb); mrb_gc_arena_restore(mrb, 0); |
