Permalink
Browse files

Check if irep is NULL before print_backtrace()

According to the valgrind log attached to #3438, proc->body.irep
may be NULL in some cases.
  • Loading branch information...
matz committed Feb 8, 2017
1 parent af4d74f commit 4b32e651a55e8bd55a9e43474823c01e999ba79e
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/backtrace.c
View
@@ -118,6 +118,7 @@ each_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, each_backtrace_func
if (MRB_PROC_CFUNC_P(ci->proc)) continue;
irep = ci->proc->body.irep;
if (!irep) continue;
if (mrb->c->cibase[i].err) {
pc = mrb->c->cibase[i].err;

0 comments on commit 4b32e65

Please sign in to comment.