diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCmdIL.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 5951df7..283d842 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.4 2004/10/31 16:43:30 dkf Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.47.2.5 2004/11/24 19:28:12 dgp Exp $ */ #include "tclInt.h" @@ -1991,11 +1991,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) - || (varPtr->flags & VAR_NAMESPACE_VAR)) { - Tcl_ListObjAppendElement(interp, listPtr, - Tcl_NewStringObj(simplePattern, -1)); + if (entryPtr != NULL) { + varPtr = (Var *) Tcl_GetHashValue(entryPtr); + if (!TclIsVarUndefined(varPtr) + || (varPtr->flags & VAR_NAMESPACE_VAR)) { + Tcl_ListObjAppendElement(interp, listPtr, + Tcl_NewStringObj(simplePattern, -1)); + } } } } else { |