diff options
author | Dave Parks <davep@lindenlab.com> | 2011-03-08 14:14:33 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-03-08 14:14:33 -0600 |
commit | 00c861f9678d21fc10a4cf481158732cf88c3805 (patch) | |
tree | 917c531fa60d9c402dd6fd49cf1165f92d8cb42f /indra/newview | |
parent | a9412b6d2e43175081a764493126ac716ee828d3 (diff) |
SH-1085 Fix for crash when disabling "mirror" and a face is selected.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llface.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llface.h | 4 |
2 files changed, 22 insertions, 4 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 10847e7067..290115417f 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -384,6 +384,24 @@ void LLFace::setSize(S32 num_vertices, S32 num_indices, bool align) llassert(verify()); } +void LLFace::setGeomIndex(U16 idx) +{ + if (mGeomIndex != idx) + { + mGeomIndex = idx; + mVertexBuffer = NULL; + } +} + +void LLFace::setIndicesIndex(S32 idx) +{ + if (mIndicesIndex != idx) + { + mIndicesIndex = idx; + mVertexBuffer = NULL; + } +} + //============================================================================ U16 LLFace::getGeometryAvatar( @@ -1858,7 +1876,7 @@ BOOL LLFace::verify(const U32* indices_array) const } // First, check whether the face data fits within the pool's range. - if ((mGeomIndex + mGeomCount) > mVertexBuffer->getNumVerts()) + if ((mGeomIndex + mGeomCount) > mVertexBuffer->getRequestedVerts()) { ok = FALSE; llinfos << "Face references invalid vertices!" << llendl; @@ -1877,7 +1895,7 @@ BOOL LLFace::verify(const U32* indices_array) const llinfos << "Face has bogus indices count" << llendl; } - if (mIndicesIndex + mIndicesCount > mVertexBuffer->getNumIndices()) + if (mIndicesIndex + mIndicesCount > mVertexBuffer->getRequestedIndices()) { ok = FALSE; llinfos << "Face references invalid indices!" << llendl; diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 1f69dd145e..b2170c4cf3 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -196,8 +196,8 @@ public: BOOL verify(const U32* indices_array = NULL) const; void printDebugInfo() const; - void setGeomIndex(U16 idx) { mGeomIndex = idx; } - void setIndicesIndex(S32 idx) { mIndicesIndex = idx; } + void setGeomIndex(U16 idx); + void setIndicesIndex(S32 idx); void setDrawInfo(LLDrawInfo* draw_info); F32 getTextureVirtualSize() ; |