summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-07-29 14:57:25 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-07-29 14:57:25 (GMT)
commit245174b90d1084b3c28e2226109162d3558431e6 (patch)
tree062cd7e13a1afaeefc61eebd4c57c117336664b6 /generic/tclCmdIL.c
parent957226e4cbf104474de8a9cb92c9dd5efafdd306 (diff)
downloadtcl-245174b90d1084b3c28e2226109162d3558431e6.zip
tcl-245174b90d1084b3c28e2226109162d3558431e6.tar.gz
tcl-245174b90d1084b3c28e2226109162d3558431e6.tar.bz2
Take care with globals that have an entry in the var table but "don't exist"
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 283d842..ab5c876 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.47.2.5 2004/11/24 19:28:12 dgp Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.47.2.6 2005/07/29 14:57:26 dkf Exp $
*/
#include "tclInt.h"
@@ -1105,8 +1105,11 @@ InfoGlobalsCmd(dummy, interp, objc, objv)
if (pattern != NULL && TclMatchIsTrivial(pattern)) {
entryPtr = Tcl_FindHashEntry(&globalNsPtr->varTable, pattern);
if (entryPtr != NULL) {
- Tcl_ListObjAppendElement(interp, listPtr,
- Tcl_NewStringObj(pattern, -1));
+ varPtr = (Var *) Tcl_GetHashValue(entryPtr);
+ if (!TclIsVarUndefined(varPtr)) {
+ Tcl_ListObjAppendElement(interp, listPtr,
+ Tcl_NewStringObj(pattern, -1));
+ }
}
} else {
for (entryPtr = Tcl_FirstHashEntry(&globalNsPtr->varTable, &search);