diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-09-26 12:51:04 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-09-26 12:55:34 +0300 |
commit | fa1c214c5b2147f0127e6abf6aa844530fd4b9a2 (patch) | |
tree | 0e55fac75c1e66542b0de0c609a6697edc01356e /source/blender | |
parent | 530b9841ee7cc8365b58d322978cb91c9c2feb52 (diff) |
Fix crash in Solidify modifier with Inner Crease
Since a8a454287a27 the simple case would crash:
- Add place
- Add Solidify modifier
- Set Inner Crease to something non-zero
Seems to be a mistake in the logic which was trying to access
existing custom data layer on a clean result while it is more
logical to create the layer.
Was initially reported by the studio who could not open
production files after the change.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/modifiers/intern/MOD_solidify_extrude.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_solidify_extrude.c b/source/blender/modifiers/intern/MOD_solidify_extrude.c index f1758b91a91..a662d729f52 100644 --- a/source/blender/modifiers/intern/MOD_solidify_extrude.c +++ b/source/blender/modifiers/intern/MOD_solidify_extrude.c @@ -1034,7 +1034,8 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex float *result_edge_crease = NULL; if (crease_rim || crease_outer || crease_inner) { - result_edge_crease = (float *)CustomData_get_layer(&result->edata, CD_CREASE); + result_edge_crease = (float *)CustomData_add_layer( + &result->edata, CD_CREASE, CD_SET_DEFAULT, NULL, result->totedge); } /* add faces & edges */ |