aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/bintree.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib/src/bintree.cc')
-rw-r--r--Carpet/CarpetLib/src/bintree.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/bintree.cc b/Carpet/CarpetLib/src/bintree.cc
index db3b27e1c..59c1e0a84 100644
--- a/Carpet/CarpetLib/src/bintree.cc
+++ b/Carpet/CarpetLib/src/bintree.cc
@@ -75,6 +75,9 @@ template <typename T, int D, typename P>
bintree<T,D,P> &
bintree<T,D,P>::operator= (bintree const & t)
{
+ assert (&t != this); // subtree delet handling is currently incorrect in this case
+ if (&t == this) return *this; // nothing to do
+
assert (invariant());
if (is_branch()) {
for (int i=0; i<2; ++i) {