Skip to content


Type check before print_backtrace()
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed May 23, 2017
1 parent bb0b52a commit 24a24a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/backtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ print_backtrace(mrb_state *mrb, mrb_value backtrace)
int i, n;
FILE *stream = stderr;

if (!mrb_array_p(backtrace)) return;
fprintf(stream, "trace:\n");

n = RARRAY_LEN(backtrace);
Expand Down

0 comments on commit 24a24a4

Please sign in to comment.