diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-10 07:42:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-10 07:42:29 +0400 |
commit | e647c748fb2cbd4d62c257f599eb5bc3d5a7f517 (patch) | |
tree | 27784ad3dda0a11741c3b64a0a46d96eb4af26e8 /source/blender/editors/mesh/editmesh_utils.c | |
parent | 2812dd92cfa29c504b647736a304b33163418c4e (diff) |
fix [#32518] Vertex slide crash sometimes.
Undo would leave BMEditMesh->me pointer NULL, this would likely crash EDBM_verts_mirror_cache_begin() too.
Rather then restore 'me', remove the pointer altogether and use BMEditMesh->ob->data to save us having to keep track of 2 pointers.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_utils.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 290ef3baba3..03e2f2691a8 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -345,7 +345,6 @@ void EDBM_mesh_make(ToolSettings *ts, Scene *UNUSED(scene), Object *ob) me->edit_btmesh->selectmode = me->edit_btmesh->bm->selectmode = ts->selectmode; me->edit_btmesh->mat_nr = (ob->actcol > 0) ? ob->actcol - 1 : 0; - me->edit_btmesh->me = me; me->edit_btmesh->ob = ob; } @@ -1056,7 +1055,7 @@ static BMVert *cache_mirr_intptr_as_bmvert(intptr_t *index_lookup, int index) #define BM_CD_LAYER_ID "__mirror_index" void EDBM_verts_mirror_cache_begin(BMEditMesh *em, const short use_select) { - Mesh *me = em->me; + Mesh *me = (Mesh *)em->ob->data; BMesh *bm = em->bm; BMIter iter; BMVert *v; |