Check ensure proc is NULL before calling; fix #3943

This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-02-09 12:34:54 +09:00
parent 4c18e37f71
commit b43c146455
+1
View File
@@ -1351,6 +1351,7 @@ RETRY_TRY_BLOCK:
for (n=0; n<a; n++) {
proc = mrb->c->ensure[epos+n];
mrb->c->ensure[epos+n] = NULL;
if (proc == NULL) continue;
irep = proc->body.irep;
ci = cipush(mrb);
ci->mid = ci[-1].mid;