summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclVar.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ee1018..2ff7fc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-13 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclVar.c: fix for [Bug 2662380], crash caused by
+ appending to a variable with a write trace that unsets it.
+
2011-04-04 Don Porter <dgp@users.sourceforge.net>
* README: Updated README files, repairing broken URLs and
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;
}
}