summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-11-24 19:28:40 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-11-24 19:28:40 (GMT)
commit29adaea589aecef2abd89539f90534d4aed48258 (patch)
tree38d9c292b369f279faa1041388b1dc038c8f95eb /generic/tclCmdIL.c
parent2f91b9a160b5c4d0ce6e48a79afc8bd635645898 (diff)
downloadtcl-29adaea589aecef2abd89539f90534d4aed48258.zip
tcl-29adaea589aecef2abd89539f90534d4aed48258.tar.gz
tcl-29adaea589aecef2abd89539f90534d4aed48258.tar.bz2
* generic/tclCmdIL.c (InfoVarsCmd): Corrected segfault in new
* tests/info.test (info-19.6): trivial matching branch [Bug 1072654]
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 9d5c829..660ceb5 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -15,7 +15,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.68 2004/10/31 16:28:21 dkf Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.69 2004/11/24 19:28:41 dgp Exp $
*/
#include "tclInt.h"
@@ -1998,11 +1998,13 @@ InfoVarsCmd(dummy, interp, objc, objv)
} else if ((nsPtr != globalNsPtr) && !specificNsInPattern) {
entryPtr = Tcl_FindHashEntry(&globalNsPtr->varTable,
simplePattern);
- varPtr = (Var *) Tcl_GetHashValue(entryPtr);
- if (!TclIsVarUndefined(varPtr)
- || TclIsVarNamespaceVar(varPtr)) {
- Tcl_ListObjAppendElement(interp, listPtr,
- Tcl_NewStringObj(simplePattern, -1));
+ if (entryPtr != NULL) {
+ varPtr = (Var *) Tcl_GetHashValue(entryPtr);
+ if (!TclIsVarUndefined(varPtr)
+ || TclIsVarNamespaceVar(varPtr)) {
+ Tcl_ListObjAppendElement(interp, listPtr,
+ Tcl_NewStringObj(simplePattern, -1));
+ }
}
}
} else {