diff options
author | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-03-08 00:05:09 +0000 |
---|---|---|
committer | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-03-08 00:05:09 +0000 |
commit | 2eb03ae3ef1d75b0966b80a2cb370f5c4ef8973a (patch) | |
tree | ced9dc9ef8b2a329223eb94e374e90f2d4df3de7 /indra/llprimitive/llmodel.cpp | |
parent | 096ea05a936d178ce0533708edab27708e9e718f (diff) | |
parent | 7b56db31f91545102744885b4f70c93278e837bd (diff) |
Merge
Diffstat (limited to 'indra/llprimitive/llmodel.cpp')
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index db6d00bc2c..8fbb4f6b96 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1034,8 +1034,11 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos) { //no exact match found, get closest point const F32 epsilon = 1e-5f; weight_map::iterator iter_up = mSkinWeights.lower_bound(pos); - weight_map::iterator iter_down = ++iter_up; - + weight_map::iterator iter_down = iter_up; + if (iter_up != mSkinWeights.end()) + { + iter_down = ++iter_up; + } weight_map::iterator best = iter_up; F32 min_dist = (iter->first - pos).magVec(); @@ -1354,7 +1357,7 @@ bool LLModel::loadSkinInfo(LLSD& header, std::istream &is) LLSD skin_data; - if (unzip_llsd(skin_data, is, size)) + if (LLUZipHelper::unzip_llsd(skin_data, is, size) == LLUZipHelper::ZR_OK) { mSkinInfo.fromLLSD(skin_data); return true; @@ -1375,7 +1378,7 @@ bool LLModel::loadDecomposition(LLSD& header, std::istream& is) LLSD data; - if (unzip_llsd(data, is, size)) + if (LLUZipHelper::unzip_llsd(data, is, size) == LLUZipHelper::ZR_OK) { mPhysics.fromLLSD(data); updateHullCenters(); |