summaryrefslogtreecommitdiffstats
path: root/generic/tclOO.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-09-08 21:22:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-09-08 21:22:05 (GMT)
commit07be9a8aa0887809dd6d79d2f079fa1d1558790e (patch)
tree10d14e9df06165aa168a49772eb74720f9640539 /generic/tclOO.c
parent277e045c81735e0509f6c38c56047faa52b5f246 (diff)
downloadtcl-07be9a8aa0887809dd6d79d2f079fa1d1558790e.zip
tcl-07be9a8aa0887809dd6d79d2f079fa1d1558790e.tar.gz
tcl-07be9a8aa0887809dd6d79d2f079fa1d1558790e.tar.bz2
Exceptional handling of oo::class has to be consistent throughout.
Diffstat (limited to 'generic/tclOO.c')
-rw-r--r--generic/tclOO.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclOO.c b/generic/tclOO.c
index ace47fe..77e668b 100644
--- a/generic/tclOO.c
+++ b/generic/tclOO.c
@@ -1287,7 +1287,9 @@ TclOORemoveFromInstances(
removeInstance:
if (Deleted(clsPtr->thisPtr)) {
- DelRef(clsPtr->instances.list[i]);
+ if (!IsRootClass(clsPtr)) {
+ DelRef(clsPtr->instances.list[i]);
+ }
clsPtr->instances.list[i] = NULL;
} else {
clsPtr->instances.num--;