diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-07 06:20:39 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-09-08 12:52:30 +0300 |
commit | 300abf241e94a56da4994dfcdb23f6906ec8b402 (patch) | |
tree | d1bc07ac882da6ab857200a60702f389436eb6d6 | |
parent | 9da098536d140690a24a4c705c9bf061bd397d92 (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 3c406764157..1733cc28fa3 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -1795,10 +1795,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))) { |