diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2021-04-02 23:02:00 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2021-04-02 23:02:00 (GMT) |
commit | 7d6ca39c8fc1416903f2fe01216ed2d7b435feb3 (patch) | |
tree | 8297205cb137369364a484c918276be16fcfe62c /generic/tclOO.c | |
parent | 171ff16f7d1431ba085c9bb1dd90d64210ffb30c (diff) | |
download | tcl-7d6ca39c8fc1416903f2fe01216ed2d7b435feb3.zip tcl-7d6ca39c8fc1416903f2fe01216ed2d7b435feb3.tar.gz tcl-7d6ca39c8fc1416903f2fe01216ed2d7b435feb3.tar.bz2 |
OO cleanup fix that passes test 11.7.
Diffstat (limited to 'generic/tclOO.c')
-rw-r--r-- | generic/tclOO.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/generic/tclOO.c b/generic/tclOO.c index 4dbe668..559cf0b 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -1184,18 +1184,19 @@ ObjectNamespaceDeleted( * freed memory. */ - if (((Command *) oPtr->command)->flags && CMD_DYING) { - /* - * Something has already started the command deletion process. We can - * go ahead and clean up the the namespace, - */ - } else { - /* - * The namespace must have been deleted directly. Delete the command - * as well. - */ + if (oPtr->command != NULL) { + if (((Command *) oPtr->command)->flags && CMD_DYING) { + /* + * The command is already (being) deleted. Proceed to clean up the the namespace, + */ + } else { + /* + * The namespace must have been deleted directly. Delete the command + * as well. + */ - Tcl_DeleteCommandFromToken(oPtr->fPtr->interp, oPtr->command); + Tcl_DeleteCommandFromToken(oPtr->fPtr->interp, oPtr->command); + } } if (oPtr->myclassCommand) { |