summaryrefslogtreecommitdiffhomepage
path: root/src/codedump.c
diff options
context:
space:
mode:
authorZhang Xiaohui <[email protected]>2020-11-18 14:41:27 +0800
committerZhang Xiaohui <[email protected]>2020-11-18 14:41:27 +0800
commiteca6266524991a894ca94371ea1e6f094c322a2b (patch)
treecba846178ec905fb17e4b9ecc628649a7c7d3143 /src/codedump.c
parent3d8350f9202576a18695d877afa1e88986df513f (diff)
downloadmruby-eca6266524991a894ca94371ea1e6f094c322a2b.tar.gz
mruby-eca6266524991a894ca94371ea1e6f094c322a2b.zip
Check if irep->reps is NULL
Diffstat (limited to 'src/codedump.c')
-rw-r--r--src/codedump.c6
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