summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBasic.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 3eab76a..e9aa6e1 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.382 2009/01/13 20:30:03 dkf Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.383 2009/01/14 06:10:04 dgp Exp $
*/
#include "tclInt.h"
@@ -3001,6 +3001,15 @@ Tcl_DeleteCommandFromToken(
}
/*
+ * A number of tests for particular kinds of commands are done by
+ * checking whether the objProc field holds a known value. Set the
+ * field to NULL so that such tests won't have false positives when
+ * applied to deleted commands.
+ */
+
+ cmdPtr->objProc = NULL;
+
+ /*
* Now free the Command structure, unless there is another reference to it
* from a CmdName Tcl object in some ByteCode code sequence. In that case,
* delay the cleanup until all references are either discarded (when a