Commit: 5b9b779cabe207bc70e0b526e8a7fa2d9baf7f74
Author: Lukas Tönne
Date:   Fri Jan 30 11:25:33 2015 +0100
Branches: strand_editmode
https://developer.blender.org/rB5b9b779cabe207bc70e0b526e8a7fa2d9baf7f74

Minor code reshuffling.

===================================================================

M       source/blender/editors/hair/hair_undo.c

===================================================================

diff --git a/source/blender/editors/hair/hair_undo.c 
b/source/blender/editors/hair/hair_undo.c
index c3096e5..0b169a8 100644
--- a/source/blender/editors/hair/hair_undo.c
+++ b/source/blender/editors/hair/hair_undo.c
@@ -117,17 +117,15 @@ static void strands_undo_to_edit(void *undov, void 
*editv, void *UNUSED(obdata))
        
        edit->bm->shapenr = undo->shapenr;
        
-       /* note: have to create the new edit before the old one,
-        * since it owns the root_dm and we have to copy it before
+       bm = BM_mesh_create(&allocsize);
+       BM_mesh_bm_from_me_ex(bm, &undo->me, CD_MASK_STRANDS, false, false, 
undo->shapenr);
+       
+       /* note: have to create the new edit before freeing the old one,
+        * because it owns the root_dm and we have to copy it before
         * it gets released when freeing the old edit.
         */
-       bm = BM_mesh_create(&allocsize);
        edit_tmp = BKE_editstrands_create(bm, dm);
-       
        BKE_editstrands_free(edit);
-       
-       BM_mesh_bm_from_me_ex(bm, &undo->me, CD_MASK_STRANDS, false, false, 
undo->shapenr);
-       
        *edit = *edit_tmp;
        
        bm->selectmode = undo->selectmode;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to