Verify that memory for mrb_state was allocated

This commit is contained in:
Jon
2012-06-03 09:27:32 -04:00
parent 7009a1d8f5
commit 49aa42f3a9
+1
View File
@@ -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;