summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authormig <mig>2011-04-13 13:09:19 (GMT)
committermig <mig>2011-04-13 13:09:19 (GMT)
commitc9f66dbf6b645b55ac34057fbf04253874ff26a5 (patch)
tree13523f8aaf8376791660f1b2b620a68cf75c470a /generic
parentb1952397aecf52090cdaec38a468370a1625db2d (diff)
downloadtcl-c9f66dbf6b645b55ac34057fbf04253874ff26a5.zip
tcl-c9f66dbf6b645b55ac34057fbf04253874ff26a5.tar.gz
tcl-c9f66dbf6b645b55ac34057fbf04253874ff26a5.tar.bz2
fix for [Bug 2662380], crash caused by appending to a variable with a write trace that unsets it
Diffstat (limited to 'generic')
-rw-r--r--generic/tclVar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 3312191..a434bae 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -2699,7 +2699,8 @@ Tcl_AppendObjCmd(dummy, interp, objc, objv)
varValuePtr = TclPtrSetVar(interp, varPtr, arrayPtr, part1, NULL,
objv[i], (TCL_APPEND_VALUE | TCL_LEAVE_ERR_MSG));
- if (varValuePtr == NULL) {
+ if ((varValuePtr == NULL) ||
+ (varValuePtr == ((Interp *) interp)->emptyObjPtr)) {
return TCL_ERROR;
}
}