Fix T75156: Cast modifier crash in edit-mode
Add NULL checks to other deform modifiers too.
This commit is contained in:
parent
a24f52c51c
commit
ac02c702e5
Notes:
blender-bot
2023-02-13 23:02:35 +01:00
Referenced by issue #75282, bug in the edit mode preview Referenced by issue #75156, Cast Modifier crashes upon entering Edit Mode
|
@ -234,7 +234,7 @@ static void deformMatrices(ModifierData *md,
|
|||
amd->defgrp_name,
|
||||
NULL);
|
||||
|
||||
if (mesh_src != mesh) {
|
||||
if (!ELEM(mesh_src, NULL, mesh)) {
|
||||
BKE_id_free(NULL, mesh_src);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -513,7 +513,7 @@ static void deformVertsEM(ModifierData *md,
|
|||
sphere_do(cmd, ctx, ctx->object, mesh_src, vertexCos, numVerts);
|
||||
}
|
||||
|
||||
if (mesh_src != mesh) {
|
||||
if (!ELEM(mesh_src, NULL, mesh)) {
|
||||
BKE_id_free(NULL, mesh_src);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ static void deformVerts(ModifierData *md,
|
|||
}
|
||||
}
|
||||
|
||||
if (mesh_src != mesh) {
|
||||
if (!ELEM(mesh_src, NULL, mesh)) {
|
||||
BKE_id_free(NULL, mesh_src);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -740,7 +740,7 @@ static void deformVerts(ModifierData *md,
|
|||
correctivesmooth_modifier_do(
|
||||
md, ctx->depsgraph, ctx->object, mesh_src, vertexCos, (uint)numVerts, NULL);
|
||||
|
||||
if (mesh_src != mesh) {
|
||||
if (!ELEM(mesh_src, NULL, mesh)) {
|
||||
BKE_id_free(NULL, mesh_src);
|
||||
}
|
||||
}
|
||||
|
@ -758,7 +758,7 @@ static void deformVertsEM(ModifierData *md,
|
|||
correctivesmooth_modifier_do(
|
||||
md, ctx->depsgraph, ctx->object, mesh_src, vertexCos, (uint)numVerts, editData);
|
||||
|
||||
if (mesh_src != mesh) {
|
||||
if (!ELEM(mesh_src, NULL, mesh)) {
|
||||
BKE_id_free(NULL, mesh_src);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ static void deformVerts(ModifierData *md,
|
|||
BKE_mesh_tessface_ensure(psmd->mesh_original);
|
||||
}
|
||||
|
||||
if (mesh_src != psmd->mesh_final && mesh_src != mesh) {
|
||||
if (!ELEM(mesh_src, NULL, mesh, psmd->mesh_final)) {
|
||||
BKE_id_free(NULL, mesh_src);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue