diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-08-29 18:15:38 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-08-29 18:15:38 -0600 |
commit | 8cef480b96dc779c5879f74224fb0a185ee550f2 (patch) | |
tree | 1eaae0ef23027ca1d4eecfe2410e0906be75880a /indra/newview/llvovolume.cpp | |
parent | f054d44f9e2e0d152b1a0167b007eb10105487d6 (diff) |
fix for SH-2311: crash at LLVOVolume::lineSegmentIntersect line 3435
and SH-2358: Crash in LLError::crashAndLoop: Invalid face index
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rwxr-xr-x | indra/newview/llvovolume.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d3ef1771c3..6b0a5d8642 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -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(); } |