summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2015-08-05 19:30:06 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2015-08-05 19:30:06 (GMT)
commit6d344dc6c28d80dc01421500132793e38ba04995 (patch)
treeb38a4d81e600a2809c0208be00397b2aa0b6bf2b
parentc4e3c617ad5a9e18249d03c7fc6bfc3fd2bf17eb (diff)
downloadtcl-6d344dc6c28d80dc01421500132793e38ba04995.zip
tcl-6d344dc6c28d80dc01421500132793e38ba04995.tar.gz
tcl-6d344dc6c28d80dc01421500132793e38ba04995.tar.bz2
remove potential crash detected by Coverity (it is a should-never-happen thing)
-rw-r--r--generic/tclVar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index fa217ef..b37283b 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -2394,8 +2394,8 @@ UnsetVarStruct(
tracePtr = NULL;
if (TclIsVarTraced(&dummyVar)) {
tPtr = Tcl_FindHashEntry(&iPtr->varTraces, &dummyVar);
- tracePtr = Tcl_GetHashValue(tPtr);
if (tPtr) {
+ tracePtr = Tcl_GetHashValue(tPtr);
Tcl_DeleteHashEntry(tPtr);
}
}