Skip to content
Snippets Groups Projects
Commit d35a8fcb authored by ruslantproductengine's avatar ruslantproductengine
Browse files

MAINT-8670 Crash in: LLFace::getGeometryVolume()

Guarded.
parent 0bd55476
No related branches found
No related tags found
No related merge requests found
...@@ -1217,6 +1217,12 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, ...@@ -1217,6 +1217,12 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{ {
LL_RECORD_BLOCK_TIME(FTM_FACE_GET_GEOM); LL_RECORD_BLOCK_TIME(FTM_FACE_GET_GEOM);
llassert(verify()); 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); const LLVolumeFace &vf = volume.getVolumeFace(f);
S32 num_vertices = (S32)vf.mNumVertices; S32 num_vertices = (S32)vf.mNumVertices;
S32 num_indices = (S32) vf.mNumIndices; S32 num_indices = (S32) vf.mNumIndices;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment