Fix for a potential crash in LLReflectionMapManager::registerSpatialGroup()
The spatial partion could potentially be NULL and shall therefore been tested for this case.
Similar fix to 08cf926d3b
master
parent
9d3f040424
commit
2d9e00eff5
|
|
@ -463,17 +463,22 @@ void LLReflectionMapManager::getReflectionMaps(std::vector<LLReflectionMap*>& ma
|
|||
|
||||
LLReflectionMap* LLReflectionMapManager::registerSpatialGroup(LLSpatialGroup* group)
|
||||
{
|
||||
if (group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_VOLUME)
|
||||
if (!group)
|
||||
{
|
||||
OctreeNode* node = group->getOctreeNode();
|
||||
F32 size = node->getSize().getF32ptr()[0];
|
||||
if (size >= 15.f && size <= 17.f)
|
||||
{
|
||||
return addProbe(group);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
LLSpatialPartition* part = group->getSpatialPartition();
|
||||
if (!part || part->mPartitionType != LLViewerRegion::PARTITION_VOLUME)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
OctreeNode* node = group->getOctreeNode();
|
||||
F32 size = node->getSize().getF32ptr()[0];
|
||||
if (size < 15.f || size > 17.f)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
return addProbe(group);
|
||||
}
|
||||
|
||||
LLReflectionMap* LLReflectionMapManager::registerViewerObject(LLViewerObject* vobj)
|
||||
|
|
|
|||
Loading…
Reference in New Issue