src/core/object.cc
changeset 2972 d76553495b91
parent 2938 621b23d5be5b
parent 2902 9c2cfada5e72
child 3033 5daf048843a6
--- a/src/core/object.cc	Thu Apr 17 15:40:25 2008 -0700
+++ b/src/core/object.cc	Thu Apr 17 15:50:49 2008 -0700
@@ -140,6 +140,13 @@
   NS_ASSERT (!o->m_disposed);
   NS_ASSERT (CheckLoose ());
   NS_ASSERT (o->CheckLoose ());
+
+  if (DoGetObject (o->m_tid))
+    {
+      NS_FATAL_ERROR ("Object::AggregateObject(): "
+       "Multiple aggregation of objects of type " << o->m_tid.GetName ());
+    }
+
   Object *other = PeekPointer (o);
   Object *next = m_next;
   m_next = other->m_next;