diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-07 06:20:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-09-07 06:20:39 +0300 |
commit | 5f7de54243f0a07b080d01122bd982af78e4201b (patch) | |
tree | 7bb5ee3a7f746c863c390f7a3c3b67f501f29d3b | |
parent | c3322603eb0611b5d3582bb65334c582485d8e9f (diff) |
Fix T52639: Weight paint smooth tool crash
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 1ae3961360c..d9ad037daea 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -1798,10 +1798,11 @@ static void vgroup_smooth_subset( } else { for (int i = 0; i < dvert_tot; i++) { - MVert *v = &me->mvert[i]; + const MVert *v = &me->mvert[i]; if (v->flag & SELECT) { for (int j = 0; j < emap[i].count; j++) { - MVert *v_other = &me->mvert[emap[i].indices[j]]; + const MEdge *e = &me->medge[emap[i].indices[j]]; + const MVert *v_other = &me->mvert[(e->v1 == i) ? e->v2 : e->v1]; if ((source == WEIGHT_SMOOTH_ALL) || (source == ((v_other->flag & SELECT) != 0))) { |