mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Verify that memory for mrb_state was allocated
This commit is contained in:
@@ -16,6 +16,7 @@ mrb_state*
|
||||
mrb_open_allocf(mrb_allocf f)
|
||||
{
|
||||
mrb_state *mrb = (f)(NULL, NULL, sizeof(mrb_state));
|
||||
if (mrb == NULL) return NULL;
|
||||
|
||||
memset(mrb, 0, sizeof(mrb_state));
|
||||
mrb->allocf = f;
|
||||
|
||||
Reference in New Issue
Block a user