Check `ensure` proc is NULL before calling; fix #3943

parent 4c18e37f
...@@ -1351,6 +1351,7 @@ RETRY_TRY_BLOCK: ...@@ -1351,6 +1351,7 @@ RETRY_TRY_BLOCK:
for (n=0; n<a; n++) { for (n=0; n<a; n++) {
proc = mrb->c->ensure[epos+n]; proc = mrb->c->ensure[epos+n];
mrb->c->ensure[epos+n] = NULL; mrb->c->ensure[epos+n] = NULL;
if (proc == NULL) continue;
irep = proc->body.irep; irep = proc->body.irep;
ci = cipush(mrb); ci = cipush(mrb);
ci->mid = ci[-1].mid; ci->mid = ci[-1].mid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment