Commit 0e539463 authored by Rory OConnell's avatar Rory OConnell

Validate ensure stack presense before calculating

parent ad440215
......@@ -324,8 +324,10 @@ os_memsize_of_object(mrb_state* mrb, mrb_value obj, mrb_bool recurse, mrb_int* t
ci_p++;
}
for(i = 0; i <= f->cxt->esize; i++) {
os_memsize_of_irep(mrb, f->cxt->ensure[i]->body.irep, t);
if(f->cxt->esize) {
for(i = 0; i <= f->cxt->esize; i++) {
os_memsize_of_irep(mrb, f->cxt->ensure[i]->body.irep, t);
}
}
(*t) += mrb_objspace_page_slot_size() +
......
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