Skip to content

Commit

Permalink
in error_print(), handle errat init more safely
Browse files Browse the repository at this point in the history
  • Loading branch information
brentr authored and FooBarWidget committed Dec 30, 2011
1 parent 37c54fe commit 509ecd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eval.c
Expand Up @@ -1266,15 +1266,15 @@ set_backtrace(info, bt)
static void
error_print()
{
VALUE errat = Qnil;
VALUE errat;
volatile VALUE eclass, e;
const char * einfo;
long elen;

if (NIL_P(ruby_errinfo)) return;

PUSH_TAG(PROT_NONE);
if (!EXEC_TAG()) errat = get_backtrace(ruby_errinfo);
errat = EXEC_TAG() ? Qnil : get_backtrace(ruby_errinfo);
if (EXEC_TAG()) goto error;
if (NIL_P(errat)){
ruby_set_current_source();
Expand Down

0 comments on commit 509ecd5

Please sign in to comment.