More protection against broken faces.

meow-7.2.2
Nicky 2014-10-16 19:53:25 +02:00
parent fca3afc614
commit 42f5ff2ce9
1 changed files with 8 additions and 0 deletions

View File

@ -1681,6 +1681,14 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
{
LLPointer<LLVertexBuffer> 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);
}
}