diff options
Diffstat (limited to 'generic/tclLink.c')
-rw-r--r-- | generic/tclLink.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/generic/tclLink.c b/generic/tclLink.c index 3cbaebb..f9cfc70 100644 --- a/generic/tclLink.c +++ b/generic/tclLink.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLink.c,v 1.8.2.2 2007/05/10 18:23:58 dgp Exp $ + * RCS: @(#) $Id: tclLink.c,v 1.8.2.3 2007/09/10 23:06:12 hobbs Exp $ */ #include "tclInt.h" @@ -206,7 +206,14 @@ Tcl_UpdateLinkedVar(interp, varName) Tcl_IncrRefCount(objPtr); Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, objPtr, TCL_GLOBAL_ONLY); Tcl_DecrRefCount(objPtr); - linkPtr->flags = (linkPtr->flags & ~LINK_BEING_UPDATED) | savedFlag; + /* + * Callback may have unlinked the variable. [Bug 1740631] + */ + linkPtr = (Link *) Tcl_VarTraceInfo(interp, varName, TCL_GLOBAL_ONLY, + LinkTraceProc, (ClientData) NULL); + if (linkPtr != NULL) { + linkPtr->flags = (linkPtr->flags & ~LINK_BEING_UPDATED) | savedFlag; + } } /* |