From b5389618f3744464760bbe1a54b49750d211a1ac Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Thu, 6 Feb 2014 10:15:00 -0700
Subject: [PATCH] more fix for a memory crash caused by accessing deleted
 pointers.

---
 indra/newview/llvocache.cpp | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 26f6987916c..2176ec9c9c0 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -589,14 +589,10 @@ void LLVOCacheEntry::updateParentBoundingInfo(const LLVOCacheEntry* child)
 //-------------------------------------------------------------------
 LLVOCacheGroup::~LLVOCacheGroup()
 {
-	//for(S32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
-	//{
-	//	if(mOcclusionState[i] & ACTIVE_OCCLUSION)
-	//	{
-	//		((LLVOCachePartition*)mSpatialPartition)->removeOccluder(this);
-	//		break;
-	//	}
-	//}
+	if(mOcclusionState[LLViewerCamera::CAMERA_WORLD] & ACTIVE_OCCLUSION)
+	{
+		((LLVOCachePartition*)mSpatialPartition)->removeOccluder(this);
+	}
 }
 
 //virtual
-- 
GitLab