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

@@ -272,11 +272,10 @@ void LLViewerOctreeEntry::removeData(LLViewerOctreeEntryData* data)
mData[data->getDataType()] = NULL;
if(mGroup != NULL && !mData[LLDRAWABLE])
if(!mGroup.isNull() && !mData[LLDRAWABLE])
{
LLViewerOctreeGroup* group = mGroup;
mGroup->removeFromGroup(data);
mGroup = NULL;
group->removeFromGroup(data);
llassert(mBinIndex == -1);
}