diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index d521a2f533..77e1ed7f31 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1681,6 +1681,14 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* { LLPointer cur_buffer = facep->getVertexBuffer(); const LLVolumeFace& cur_vol_face = volume->getVolumeFace(i); + if( cur_vol_face.mNumVertices > 0x10000 || cur_vol_face.mNumVertices < 0 || cur_vol_face.mNumIndices < 0 ) + { + LL_WARNS() << "Skipping face " << i + << " vertices " << cur_vol_face.mNumVertices << " indices " << cur_vol_face.mNumIndices + << " face is possibly corrupted" + << LL_ENDL; + continue; + } getRiggedGeometry(facep, cur_buffer, face_data_mask, skin, volume, cur_vol_face); } }