Fix crash exiting edit-mode with an active basis shape key

Exposed by T71865, while the bug remains this resolves the crash.
This commit is contained in:
Campbell Barton 2019-11-28 04:16:38 +11:00
parent 9e3006e507
commit 34902f2008
Notes: blender-bot 2023-02-14 08:06:33 +01:00
Referenced by issue #71865, Separating mesh parts breaks shape keys
1 changed files with 1 additions and 1 deletions

View File

@ -879,7 +879,7 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh
BM_ITER_MESH_INDEX (eve, &iter, bm, BM_VERTS_OF_MESH, i) {
const int keyi = BM_ELEM_CD_GET_INT(eve, cd_shape_keyindex_offset);
if (keyi != ORIGINDEX_NONE) {
if (keyi != ORIGINDEX_NONE && keyi < actkey->totelem) {
sub_v3_v3v3(ofs[i], mvert->co, fp[keyi]);
}
else {