state.c: reps may be NULL if a broken compiled binary given.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-02-14 16:04:44 +09:00
parent e884236e1c
commit aba3d427c7
+1
View File
@@ -137,6 +137,7 @@ mrb_irep_cutref(mrb_state *mrb, mrb_irep *irep)
if (irep->flags & MRB_IREP_NO_FREE) return;
reps = (mrb_irep**)irep->reps;
if (!reps) return;
for (i=0; i<irep->rlen; i++) {
mrb_irep *tmp = reps[i];
reps[i] = NULL;