fix for SH-2311: crash at LLVOVolume::lineSegmentIntersect line 3435
and SH-2358: Crash in LLError::crashAndLoop: Invalid face indexmeow-7.2.2
parent
f054d44f9e
commit
8cef480b96
|
|
@ -2734,7 +2734,7 @@ void LLVolume::cacheOptimize()
|
|||
|
||||
S32 LLVolume::getNumFaces() const
|
||||
{
|
||||
return (S32)mProfilep->mFaces.size();
|
||||
return mIsMeshAssetLoaded ? getNumVolumeFaces() : (S32)mProfilep->mFaces.size();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1660,11 +1660,16 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)
|
|||
compiled = TRUE;
|
||||
sNumLODChanges += new_num_faces ;
|
||||
|
||||
if((S32)getNumTEs() != getVolume()->getNumFaces())
|
||||
{
|
||||
setNumTEs(getVolume()->getNumFaces()); //mesh loading may change number of faces.
|
||||
}
|
||||
|
||||
drawable->setState(LLDrawable::REBUILD_VOLUME); // for face->genVolumeTriangles()
|
||||
|
||||
{
|
||||
LLFastTimer t(FTM_GEN_TRIANGLES);
|
||||
if (new_num_faces != old_num_faces)
|
||||
if (new_num_faces != old_num_faces || mNumFaces != (S32)getNumTEs())
|
||||
{
|
||||
regenFaces();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue