diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2018-01-22 18:11:12 +0200 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2018-01-22 18:11:12 +0200 |
commit | 460c28b45631c6282200628d0725672ce5679490 (patch) | |
tree | ddcfbab9a28b97a924efae0968e811b09d95fafc /indra/llprimitive | |
parent | 78f96e6f0a5eaa1c740ab1dd66ec7e56b0db8bb2 (diff) |
MAINT-8208 [Mac] Viewer crashes when uploading certain mesh model after enabling "Include skin weight"
Diffstat (limited to 'indra/llprimitive')
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 29af859cd0..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(); |