From bc0abc773451d5a71f7f0b024e8d389327425446 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 2 Oct 2012 12:11:42 -0500 Subject: Fix up some assertions in lloctree.h --- indra/newview/lldrawable.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 108ec92f6d..0722e66571 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -945,6 +945,12 @@ void LLDrawable::updateUVMinMax() void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp) { + //precondition: mSpatialGroupp MUST be null or DEAD or mSpatialGroupp MUST NOT contain this + llassert(!mSpatialGroupp || mSpatialGroupp->isDead() || !mSpatialGroupp->hasElement(this)); + + //precondition: groupp MUST be null or groupp MUST contain this + llassert(!groupp || groupp->hasElement(this)); + /*if (mSpatialGroupp && (groupp != mSpatialGroupp)) { mSpatialGroupp->setState(LLSpatialGroup::GEOM_DIRTY); @@ -1468,6 +1474,10 @@ void LLSpatialBridge::cleanupReferences() LLDrawable::cleanupReferences(); if (mDrawable) { + /* + + DON'T DO THIS -- this should happen through octree destruction + mDrawable->setSpatialGroup(NULL); if (mDrawable->getVObj()) { @@ -1482,7 +1492,7 @@ void LLSpatialBridge::cleanupReferences() drawable->setSpatialGroup(NULL); } } - } + }*/ LLDrawable* drawablep = mDrawable; mDrawable = NULL; -- cgit v1.2.3