diff options
| author | Zhang Xiaohui <[email protected]> | 2020-11-18 14:41:27 +0800 |
|---|---|---|
| committer | Zhang Xiaohui <[email protected]> | 2020-11-18 14:41:27 +0800 |
| commit | eca6266524991a894ca94371ea1e6f094c322a2b (patch) | |
| tree | cba846178ec905fb17e4b9ecc628649a7c7d3143 /src/codedump.c | |
| parent | 3d8350f9202576a18695d877afa1e88986df513f (diff) | |
| download | mruby-eca6266524991a894ca94371ea1e6f094c322a2b.tar.gz mruby-eca6266524991a894ca94371ea1e6f094c322a2b.zip | |
Check if irep->reps is NULL
Diffstat (limited to 'src/codedump.c')
| -rw-r--r-- | src/codedump.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/codedump.c b/src/codedump.c index e70df3205..524f0b9e1 100644 --- a/src/codedump.c +++ b/src/codedump.c @@ -545,8 +545,10 @@ codedump_recur(mrb_state *mrb, const mrb_irep *irep) int i; codedump(mrb, irep); - for (i=0; i<irep->rlen; i++) { - codedump_recur(mrb, irep->reps[i]); + if (irep->reps) { + for (i=0; i<irep->rlen; i++) { + codedump_recur(mrb, irep->reps[i]); + } } } #endif |
