Permalink
Browse files

in error_print(), handle errat init more safely

  • Loading branch information...
1 parent c8ff0f8 commit 7ed5ec35989189d06ce0872a87569f4fcbbf6c17 @brentr committed Feb 26, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 eval.c
View
4 eval.c
@@ -1260,15 +1260,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();

0 comments on commit 7ed5ec3

Please sign in to comment.