diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-02 16:45:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-02 17:59:44 +0300 |
commit | 50994eace677e1775382ded567898f1ff4cb5467 (patch) | |
tree | b1941b96d373f7d8362bc6e8e8e0a084bf82856c /source/blender/modifiers | |
parent | b18c2a3c413b7741b2a854b7bd25721352be2589 (diff) |
Fix T66967: skin modifier crash scaling skin radius to zero
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_skin.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c index 98c7d809f33..34590736e37 100644 --- a/source/blender/modifiers/intern/MOD_skin.c +++ b/source/blender/modifiers/intern/MOD_skin.c @@ -922,7 +922,13 @@ static Mesh *subdivide_base(Mesh *orig) u = e->v1; radrat = (half_v2(outnode[e->v2].radius) / half_v2(outnode[e->v1].radius)); - radrat = (radrat + 1) / 2; + if (isfinite(radrat)) { + radrat = (radrat + 1) / 2; + } + else { + /* Happens when skin is scaled to zero. */ + radrat = 1.0f; + } /* Add vertices and edge segments */ for (j = 0; j < edge_subd[i]; j++, v++, outedge++) { |