diff options
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
-rw-r--r-- | indra/newview/llvieweroctree.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 5eda75753e..12624ec3a2 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -564,7 +564,7 @@ void LLViewerOctreeGroup::rebound() group->setState(SKIP_FRUSTUM_CHECK); } - else if (mOctreeNode->isLeaf()) + else if (mOctreeNode->getChildCount() == 0) { //copy object bounding box if this is a leaf boundObjects(TRUE, mExtents[0], mExtents[1]); mBounds[0] = mObjectBounds[0]; @@ -1325,8 +1325,13 @@ LLViewerOctreePartition::LLViewerOctreePartition() : LLViewerOctreePartition::~LLViewerOctreePartition() { - delete mOctree; - mOctree = NULL; + cleanup(); +} + +void LLViewerOctreePartition::cleanup() +{ + delete mOctree; + mOctree = nullptr; } BOOL LLViewerOctreePartition::isOcclusionEnabled() @@ -1334,6 +1339,7 @@ BOOL LLViewerOctreePartition::isOcclusionEnabled() return mOcclusionEnabled || LLPipeline::sUseOcclusion > 2; } + //----------------------------------------------------------------------------------- //class LLViewerOctreeCull definitions //----------------------------------------------------------------------------------- |