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:
authorJacques Lucke <mail@jlucke.com>2019-09-20 11:41:29 +0300
committerJacques Lucke <mail@jlucke.com>2019-09-20 11:41:49 +0300
commit44d0c868bf06967e29f545dee420c4dab9b7c8c0 (patch)
tree16b0c37fd03027e9605ed5f043a9c445dc20e419 /source/blender/modifiers
parentf83a8a61fffeaeff1a4bb0ea2e96c60727d3f129 (diff)
Fix T70101: Displace modifier handles empty vertex group incorrectly
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_displace.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c
index ac0d72214c8..9cb694be88b 100644
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@ -294,6 +294,11 @@ static void displaceModifier_do(DisplaceModifierData *dmd,
mvert = mesh->mvert;
MOD_get_vgroup(ob, mesh, dmd->defgrp_name, &dvert, &defgrp_index);
+ if (defgrp_index >= 0 && dvert == NULL) {
+ /* There is a vertex group, but it has no vertices. */
+ return;
+ }
+
Tex *tex_target = dmd->texture;
if (tex_target != NULL) {
tex_co = MEM_calloc_arrayN((size_t)numVerts, sizeof(*tex_co), "displaceModifier_do tex_co");