summaryrefslogtreecommitdiff
path: root/indra/newview/llvotree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvotree.cpp')
-rw-r--r--indra/newview/llvotree.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index 14b4273b02..cfb15b42c4 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -1167,9 +1167,15 @@ void LLVOTree::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
pos.load3(center.mV);
mDrawable->setPositionGroup(pos);
- LLFace* facep = mDrawable->getFace(0);
- facep->mExtents[0] = newMin;
- facep->mExtents[1] = newMax;
+ if (mDrawable->getNumFaces() > 0)
+ {
+ LLFace* facep = mDrawable->getFace(0);
+ if (facep)
+ {
+ facep->mExtents[0] = newMin;
+ facep->mExtents[1] = newMax;
+ }
+ }
}
bool LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32 *face_hitp,