summaryrefslogtreecommitdiff
path: root/indra/newview/llspatialpartition.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-05-18 18:01:22 +0000
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-05-18 18:01:22 +0000
commit2b8d3dc6fda2c1d9d1f37a73d24230773e5fe16f (patch)
treef12c35abe3784616aedd085854f4f5f474db9c5a /indra/newview/llspatialpartition.cpp
parentb7d8c9107e2fe87a920cee2f05296bc8d63f9b54 (diff)
parent97519423727f340c1b19b2a61bb48f7c00c387dd (diff)
Merged in SL-13265 "Empty leaf" crash safeguards
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rw-r--r--indra/newview/llspatialpartition.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 77bbcdada6..d39c3d3ea8 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -3123,13 +3123,13 @@ void renderRaycast(LLDrawable* drawablep)
LLGLEnable blend(GL_BLEND);
gGL.diffuseColor4f(0,1,1,0.5f);
- if (drawablep->getVOVolume())
+ LLVOVolume* vobj = drawablep->getVOVolume();
+ if (vobj && !vobj->isDead())
{
//glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
//pushVerts(drawablep->getFace(gDebugRaycastFaceHit), LLVertexBuffer::MAP_VERTEX);
//glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- LLVOVolume* vobj = drawablep->getVOVolume();
LLVolume* volume = vobj->getVolume();
bool transform = true;
@@ -3358,7 +3358,7 @@ public:
for (OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i)
{
LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
- if(!drawable)
+ if(!drawable || drawable->isDead())
{
continue;
}