aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/region.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib/src/region.cc')
-rw-r--r--Carpet/CarpetLib/src/region.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/region.cc b/Carpet/CarpetLib/src/region.cc
index ea8572b1f..a709364dd 100644
--- a/Carpet/CarpetLib/src/region.cc
+++ b/Carpet/CarpetLib/src/region.cc
@@ -35,6 +35,9 @@ region_t::region_t (region_t const & a)
region_t &
region_t::operator= (region_t const & a)
{
+ assert(&a != this); // was not correctly handled before, see if it was actually used
+ if (&a == this) return *this; // nothing to do
+
assert (invariant());
if (processors != NULL) {
delete processors;