Third fix for my merge: crash after switch to edit mode reported by @dfelinto
authorAlexander Romanov <a.romanov@blend4web.com>
Tue, 4 Jul 2017 14:53:19 +0000 (17:53 +0300)
committerAlexander Romanov <a.romanov@blend4web.com>
Tue, 4 Jul 2017 14:53:19 +0000 (17:53 +0300)
source/blender/blenkernel/intern/mesh_tangent.c

index d370e2021349fa42441b334196e63143759cbbb4..c1b74b3eb6f589ceb389d7f25bde79adc147b346 100644 (file)
@@ -645,7 +645,7 @@ void BKE_mesh_calc_loop_tangent_ex(
                                    tangent_mask_curr |= DM_TANGENT_MASK_ORCO;
                                }
                                else {
-                                   int uv_ind = CustomData_get_named_layer_index(loopdata, CD_MLOOPUV, loopdata->layers[index].name);
+                                   int uv_ind = CustomData_get_named_layer_index(loopdata, CD_MLOOPUV, loopdata_out->layers[index].name);
                                    int uv_start = CustomData_get_layer_index(loopdata, CD_MLOOPUV);
                                    BLI_assert(uv_ind != -1 && uv_start != -1);
                                    BLI_assert(uv_ind - uv_start < MAX_MTFACE);