summaryrefslogtreecommitdiff
path: root/libguile/backtrace.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-02-09 23:13:53 +0100
committerAndy Wingo <wingo@pobox.com>2011-02-09 23:17:09 +0100
commitc7c2d875478f2dea583c21fed4b3231e43e88d69 (patch)
tree31316e315f56b19f6921bce97b6e9bda5e7e75d6 /libguile/backtrace.c
parent5a5885215afae3c547ae6ca10e769704b0f7e3d9 (diff)
downloadguile-c7c2d875478f2dea583c21fed4b3231e43e88d69.tar.gz
fix a couple of (system vm frame) accesses on boot errors
* libguile/backtrace.c (display_error_body): Don't look up the frame-source if Guile isn't initialized yet. Fixes display-error before boot has finished. * libguile/throw.c (handler_message): Likewise, don't backtrace before boot has finished, because we can't load (system vm frame).
Diffstat (limited to 'libguile/backtrace.c')
-rw-r--r--libguile/backtrace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libguile/backtrace.c b/libguile/backtrace.c
index b4bee732d..7e93ff3f5 100644
--- a/libguile/backtrace.c
+++ b/libguile/backtrace.c
@@ -1,5 +1,5 @@
/* Printing of backtraces and error messages
- * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010 Free Software Foundation
+ * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010, 2011 Free Software Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -200,7 +200,8 @@ display_error_body (struct display_error_args *a)
if (SCM_FRAMEP (a->frame))
{
- source = scm_frame_source (a->frame);
+ if (scm_initialized_p)
+ source = scm_frame_source (a->frame);
if (!scm_is_symbol (pname) && !scm_is_string (pname))
pname = scm_procedure_name (scm_frame_procedure (a->frame));
}