diff options
author | Graham Linden <graham@lindenlab.com> | 2019-08-06 14:41:55 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-08-06 14:41:55 -0700 |
commit | 71af0a2a9e9f90d1e336f8a30f642bb5e19ef658 (patch) | |
tree | b730f130358e4d1c7bffefdddc183b242d75fe5a /indra/llcharacter | |
parent | 76128c4357bc36acd54575153516c6d337fe4263 (diff) |
Fix shutdown crash in teardown of joint heirarchy.
Ifdef'd code for potential skinning speed up to avoid lots of int<->float conversions (expensive and static for min space investment)
as updating rigged VBs shows up as a profiling bottleneck for Low rendering (where we actually use CPU skinning).
Diffstat (limited to 'indra/llcharacter')
-rw-r--r-- | indra/llcharacter/lljoint.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 36ecf8cb4b..a685df5925 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -303,16 +303,17 @@ void LLJoint::removeChild(LLJoint* joint) //-------------------------------------------------------------------- void LLJoint::removeAllChildren() { - for (joints_t::iterator iter = mChildren.begin(); - iter != mChildren.end();) + for (LLJoint* joint : mChildren) { - joints_t::iterator curiter = iter++; - LLJoint* joint = *curiter; - mChildren.erase(curiter); - joint->mXform.setParent(NULL); - joint->mParent = NULL; - joint->touch(); + if (joint) + { + joint->mXform.setParent(NULL); + joint->mParent = NULL; + joint->touch(); + //delete joint; + } } + mChildren.clear(); } |