mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Support the case when the backtrace is not an array.
This commit is contained in:
+1
-1
@@ -174,7 +174,7 @@ exc_get_backtrace(mrb_state *mrb, mrb_value exc)
|
||||
|
||||
attr_name = mrb_intern_lit(mrb, "backtrace");
|
||||
backtrace = mrb_iv_get(mrb, exc, attr_name);
|
||||
if (mrb_nil_p(backtrace)) {
|
||||
if (!mrb_array_p(backtrace)) {
|
||||
if (mrb_obj_ptr(exc) == mrb->backtrace.exc && mrb->backtrace.n > 0) {
|
||||
backtrace = mrb_restore_backtrace(mrb);
|
||||
mrb->backtrace.n = 0;
|
||||
|
||||
Reference in New Issue
Block a user