Prefer LLPointer over potential for dangling LLSpatialGroup pointers.

This commit is contained in:
Shyotl
2020-04-09 01:56:32 -05:00
parent 8a16e6c99f
commit 24331d3c90
6 changed files with 12 additions and 10 deletions

View File

@@ -3459,8 +3459,9 @@ void forAllDrawables(LLCullResult::sg_iterator begin,
{
for (LLCullResult::sg_iterator i = begin; i != end; ++i)
{
OctreeGuard guard((*i)->getOctreeNode());
for (LLSpatialGroup::element_iter j = (*i)->getDataBegin(); j != (*i)->getDataEnd(); ++j)
LLSpatialGroup* group = (*i).get();
OctreeGuard guard(group->getOctreeNode());
for (LLSpatialGroup::element_iter j = group->getDataBegin(); j != group->getDataEnd(); ++j)
{
func((LLDrawable*)(*j)->getDrawable());
}