diff options
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r-- | generic/tclObj.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c index df17f13..d3f59ec 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -4264,8 +4264,13 @@ TclSetCmdNameObj( Command *cmdPtr) /* Points to Command structure that the * CmdName object should refer to. */ { + register ResolvedCmdName *resPtr; + if (objPtr->typePtr == &tclCmdNameType) { - return; + resPtr = objPtr->internalRep.twoPtrValue.ptr1; + if (resPtr != NULL && resPtr->cmdPtr == cmdPtr) { + return; + } } SetCmdNameObj(interp, objPtr, cmdPtr, NULL); |