diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-18 18:13:31 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-11-18 18:13:31 +0900 |
| commit | b9c80a5357c1e8550e5e06359be066c4a9077ad9 (patch) | |
| tree | 5c161f32a14a6893332e3c36c7eaf83c00c4fb68 /src | |
| parent | e0df30354733eeeb9f69a9d45617e838ad0ad4a2 (diff) | |
| parent | d3e17eedeeed41241e297b9a8b9d26f54b40f250 (diff) | |
| download | mruby-b9c80a5357c1e8550e5e06359be066c4a9077ad9.tar.gz mruby-b9c80a5357c1e8550e5e06359be066c4a9077ad9.zip | |
Merge pull request #5147 from hifoolno/patch1
Check if irep->reps is NULL in lv_defined_p
Diffstat (limited to 'src')
| -rw-r--r-- | src/dump.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dump.c b/src/dump.c index 2bc1b0a53..4bec85006 100644 --- a/src/dump.c +++ b/src/dump.c @@ -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; |
