aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/fulltree.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib/src/fulltree.cc')
-rw-r--r--Carpet/CarpetLib/src/fulltree.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/fulltree.cc b/Carpet/CarpetLib/src/fulltree.cc
index d482691cf..202d59b77 100644
--- a/Carpet/CarpetLib/src/fulltree.cc
+++ b/Carpet/CarpetLib/src/fulltree.cc
@@ -77,6 +77,9 @@ template <typename T, int D, typename P>
fulltree<T,D,P> &
fulltree<T,D,P>::operator= (fulltree 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 (size_t i=0; i<subtrees.size(); ++i) {