diff options
author | Dave Parks <davep@lindenlab.com> | 2011-03-03 16:14:52 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-03-03 16:14:52 -0600 |
commit | 162d467b4a8ca1dae6b16ece1728873d43a287ac (patch) | |
tree | f0ef60a4bdae99efb6b829b51841993bc3f6fa01 /indra/newview/lldrawable.cpp | |
parent | fcb205131ccc02b2b50e79ad274ed4ef4fec0330 (diff) |
SH-1085 Fix for crash when unchecking "mirror." Basically got LLFace to be paranoid about who gets to touch its LLVertexBuffer members.
Reviewed by Nyx.
Diffstat (limited to 'indra/newview/lldrawable.cpp')
-rw-r--r-- | indra/newview/lldrawable.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index d370c72a04..fe743e7451 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -820,8 +820,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector) if (!volume && facep->hasGeometry()) { - facep->mVertexBuffer = NULL; - facep->mLastVertexBuffer = NULL; + facep->clearVertexBuffer(); } } @@ -935,6 +934,18 @@ void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp) { mSpatialGroupp->setState(LLSpatialGroup::GEOM_DIRTY); }*/ + + if (mSpatialGroupp != groupp && getVOVolume()) + { //NULL out vertex buffer references for volumes on spatial group change to maintain + //requirement that every face vertex buffer is either NULL or points to a vertex buffer + //contained by its drawable's spatial group + for (S32 i = 0; i < getNumFaces(); ++i) + { + LLFace* facep = getFace(i); + facep->clearVertexBuffer(); + } + } + mSpatialGroupp = groupp; } |