Skip to content
Snippets Groups Projects
Commit cd987119 authored by Xiaohong Bao's avatar Xiaohong Bao
Browse files

fix a memory crash caused by accessing deleted pointers.

parent e2d14cfd
No related branches found
No related tags found
No related merge requests found
......@@ -589,14 +589,14 @@ 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;
}
}
//for(S32 i = 0; i < LLViewerCamera::NUM_CAMERAS; i++)
//{
// if(mOcclusionState[i] & ACTIVE_OCCLUSION)
// {
// ((LLVOCachePartition*)mSpatialPartition)->removeOccluder(this);
// break;
// }
//}
}
//virtual
......@@ -979,7 +979,11 @@ void LLVOCachePartition::processOccluders(LLCamera* camera)
group->doOcclusion(camera, &shift);
group->clearOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION);
}
}
}
//safe to clear mOccludedGroups here because only the world camera accesses it.
mOccludedGroups.clear();
sNeedsOcclusionCheck = FALSE;
}
void LLVOCachePartition::resetOccluders()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment