summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-06-21 09:13:19 -0700
committerRider Linden <rider@lindenlab.com>2018-06-21 09:13:19 -0700
commitf07dc421e81d945531dc6f4befc19ea4fe4b9a47 (patch)
tree7ac8fa1fbfad64c616161488a5d0be10c1eaba34 /indra/newview/llface.cpp
parent8b3957b310afa23e543c3eb33aca9131dba52b31 (diff)
parentdc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff)
Merge
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 1acb1650cd..14b13c1f5f 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1223,6 +1223,12 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{
LL_RECORD_BLOCK_TIME(FTM_FACE_GET_GEOM);
llassert(verify());
+
+ if (volume.getNumVolumeFaces() <= f) {
+ LL_WARNS() << "Attempt get volume face out of range! Total Faces: " << volume.getNumVolumeFaces() << " Attempt get access to: " << f << LL_ENDL;
+ return FALSE;
+ }
+
const LLVolumeFace &vf = volume.getVolumeFace(f);
S32 num_vertices = (S32)vf.mNumVertices;
S32 num_indices = (S32) vf.mNumIndices;