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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-08-06 12:48:05 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-08-06 12:49:42 +0300
commitd890ad37a8268d31f3f79443b6c3b4a3c6a8b10e (patch)
treed8995fe1e66012695b6198a2ab1baacf58a64bc6 /source/blender/modifiers/intern/MOD_weightvgedit.c
parente680a9d80d46a7d76552664a0210ac2750d9ab49 (diff)
Fix horrible invalid mesh freeing in weightvg modifiers.
Comes from rB7661f8a65b. Found while checking on T55818, but not solving that issue of course.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvgedit.c')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgedit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c
index a34ed1baaff..356edcd7bec 100644
--- a/source/blender/modifiers/intern/MOD_weightvgedit.c
+++ b/source/blender/modifiers/intern/MOD_weightvgedit.c
@@ -214,7 +214,9 @@ static Mesh *applyModifier(
}
/* Ultimate security check. */
if (!dvert) {
- BKE_id_free(NULL, result);
+ if (result != mesh) {
+ BKE_id_free(NULL, result);
+ }
return mesh;
}