Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-03-29 08:08:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-29 08:09:09 +0300
commitac02c702e5ecfd1a01f0c377dc30336a473580ca (patch)
tree4a7f3d7f6187d3f9a4005368bf9c834fa5b5f8be /source/blender/modifiers/intern/MOD_correctivesmooth.c
parenta24f52c51cff4e11a65298363de8cb0fa7260814 (diff)
Fix T75156: Cast modifier crash in edit-mode
Add NULL checks to other deform modifiers too.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_correctivesmooth.c')
-rw-r--r--source/blender/modifiers/intern/MOD_correctivesmooth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c
index 4eea9092e10..52003f8b1d8 100644
--- a/source/blender/modifiers/intern/MOD_correctivesmooth.c
+++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c
@@ -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);
}
}