summaryrefslogtreecommitdiffhomepage
path: root/src/state.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-08-20 23:38:49 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-08-20 23:38:49 +0900
commite73a0913430fbffcf5ec741055dfdc6146fa743c (patch)
tree672bd9cb5d67c17023e39bdab72f625760cba24b /src/state.c
parentc7fda2232b690f5e68a5d1f72e9dc8cd21682703 (diff)
parent05ede52239fce58b6a8be4b72d51db10ae1c2632 (diff)
downloadmruby-e73a0913430fbffcf5ec741055dfdc6146fa743c.tar.gz
mruby-e73a0913430fbffcf5ec741055dfdc6146fa743c.zip
Merge branch 'cubicdaiya-issues/scope_new_error_handlings'
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c4
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);