summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordas <das>2003-12-17 18:40:07 (GMT)
committerdas <das>2003-12-17 18:40:07 (GMT)
commitb6816410ac218247688be307500a6471f1b0ba21 (patch)
treea3770e3d7e58aa0ccd1ec030a32c6295f9ec81d8 /generic
parent298b0c4ef39a21c71fcb823f41bb903203d8430b (diff)
downloadtcl-b6816410ac218247688be307500a6471f1b0ba21.zip
tcl-b6816410ac218247688be307500a6471f1b0ba21.tar.gz
tcl-b6816410ac218247688be307500a6471f1b0ba21.tar.bz2
* generic/tclBinary.c (DeleteScanNumberCache): fixed crashing bug
when numeric scan-value cache contains NULL value.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBinary.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index dcac12f..048dc1e 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBinary.c,v 1.14 2003/12/02 09:29:54 dkf Exp $
+ * RCS: @(#) $Id: tclBinary.c,v 1.15 2003/12/17 18:40:07 das Exp $
*/
#include "tclInt.h"
@@ -1736,7 +1736,9 @@ DeleteScanNumberCache(numberCachePtr)
while (hEntry != NULL) {
register Tcl_Obj *value = (Tcl_Obj *) Tcl_GetHashValue(hEntry);
- Tcl_DecrRefCount(value);
+ if (value != NULL) {
+ Tcl_DecrRefCount(value);
+ }
hEntry = Tcl_NextHashEntry(&search);
}
Tcl_DeleteHashTable(numberCachePtr);