summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-07-25 16:53:01 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-07-25 16:53:01 -0600
commit83a628a431b569555ea68588e18a49159acbfd0c (patch)
treea4be9ae29c96ab53e0ff0f10aff0d0c0ea34dca1 /indra/newview
parent073a207ab902dc0589a30af234a4798e914a731a (diff)
fix for SH-4298: Interesting: Viewer crash in LLViewerOctreeCull and
SH-4341: Interesting: Viewer crash in LLViewerOctreeCull
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvieweroctree.cpp10
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