summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authordas <das>2008-08-14 02:09:55 (GMT)
committerdas <das>2008-08-14 02:09:55 (GMT)
commitaf494a7fa60b807ea5ea6c39c2cfe0da1c846eb8 (patch)
treeebfc184f0c2ccae1c3b27a6a7f84feffbc290177 /generic/tclCmdIL.c
parent749f2802fc8376dc768087cdec029dc3b9a7dc49 (diff)
downloadtcl-af494a7fa60b807ea5ea6c39c2cfe0da1c846eb8.zip
tcl-af494a7fa60b807ea5ea6c39c2cfe0da1c846eb8.tar.gz
tcl-af494a7fa60b807ea5ea6c39c2cfe0da1c846eb8.tar.bz2
* generic/tclCmdIL.c (TclInfoFrame): check fPtr->line before
dereferencing as line info may not exists when TclInfoFrame() is called from a DTrace probe.
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index bbddc63..e1267a9 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.137.2.3 2008/07/23 20:47:31 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.137.2.4 2008/08/14 02:09:55 das Exp $
*/
#include "tclInt.h"
@@ -1202,7 +1202,9 @@ TclInfoFrame(
*/
ADD_PAIR("type", Tcl_NewStringObj(typeString[fPtr->type], -1));
- ADD_PAIR("line", Tcl_NewIntObj(fPtr->line[0]));
+ if (fPtr->line) {
+ ADD_PAIR("line", Tcl_NewIntObj(fPtr->line[0]));
+ }
if (fPtr->type == TCL_LOCATION_SOURCE) {
ADD_PAIR("file", fPtr->data.eval.path);