diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llvieweroctree.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 7b3186d40a..bba3d26e09 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -464,15 +464,16 @@ bool LLviewerOctreeGroup::removeFromGroup(LLViewerOctreeEntry* entry) llassert(!entry->getGroup()); unbound(); + setState(OBJECT_DIRTY); + if (mOctreeNode) { - if (!mOctreeNode->remove(entry)) + if (!mOctreeNode->remove(entry)) //this could cause *this* pointer to be destroyed, so no more function calls after this. { OCT_ERRS << "Could not remove LLVOCacheEntry from LLVOCacheOctreeGroup" << llendl; return false; } - } - setState(OBJECT_DIRTY); + } return true; } @@ -580,9 +581,10 @@ void LLviewerOctreeGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEn //virtual void LLviewerOctreeGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntry* obj) { - obj->setGroup(NULL); unbound(); setState(OBJECT_DIRTY); + + obj->setGroup(NULL); //this could cause *this* pointer to be destroyed. So no more function calls after this. } //virtual |