[Bf-blender-cvs] [3c6260d42de] master: Fix T66301: Crash on vertex slide when the vertex is not linked to a face.

mano-wii noreply at git.blender.org
Mon Jul 1 15:27:39 CEST 2019


Commit: 3c6260d42de007c223c4bdb1bc8ed5431f2f2963
Author: mano-wii
Date:   Mon Jul 1 10:26:37 2019 -0300
Branches: master
https://developer.blender.org/rB3c6260d42de007c223c4bdb1bc8ed5431f2f2963

Fix T66301: Crash on vertex slide when the vertex is not linked to a face.

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

M	source/blender/editors/transform/transform.c

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

diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 5b3f7d85b43..22900ee3787 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -6440,6 +6440,8 @@ static void slide_origdata_create_data(TransDataContainer *tc,
 
     layer_index_dst = 0;
 
+    /* TODO: We don't need `sod->layer_math_map` when there are no loops linked
+     * to one of the sliding vertices. */
     if (CustomData_has_math(&bm->ldata)) {
       /* over alloc, only 'math' layers are indexed */
       sod->layer_math_map = MEM_mallocN(bm->ldata.totlayer * sizeof(int), __func__);
@@ -6583,7 +6585,7 @@ static void slide_origdata_interp_data_vert(SlideOrigData *sod,
     }
   }
 
-  if (sod->layer_math_map_num) {
+  if (sod->layer_math_map_num && sv->cd_loop_groups) {
     if (do_loop_weight) {
       for (j = 0; j < sod->layer_math_map_num; j++) {
         BM_vert_loop_groups_data_layer_merge_weights(



More information about the Bf-blender-cvs mailing list