Unverified Commit b9c80a53 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #5147 from hifoolno/patch1

Check if irep->reps is NULL in lv_defined_p
parents e0df3035 d3e17eed
......@@ -773,8 +773,10 @@ lv_defined_p(const mrb_irep *irep)
if (irep->lv) { return TRUE; }
for (i = 0; i < irep->rlen; ++i) {
if (lv_defined_p(irep->reps[i])) { return TRUE; }
if (irep->reps) {
for (i = 0; i < irep->rlen; ++i) {
if (lv_defined_p(irep->reps[i])) { return TRUE; }
}
}
return FALSE;
......
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