diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-11 09:52:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-09-11 09:52:53 +0300 |
commit | 7d7741d25fb7d248b557c6f5270510d7c0dbe923 (patch) | |
tree | cfb288dc6297f35be54f73470b9f465238f88281 /source/blender/editors/sculpt_paint/paint_stroke.c | |
parent | 49ba9d02d8dc5e1aef3cc0f0b3453866125af64c (diff) | |
parent | f56fea3d6b481b70e5ca518e41dab8c00bc26251 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index b1007f01c8d..d92afd414f8 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -589,7 +589,10 @@ static float paint_stroke_integrate_overlap(Brush *br, float factor) max = overlap; } - return 1.0f / max; + if (max == 0.0f) + return 1.0f; + else + return 1.0f / max; } static float paint_space_stroke_spacing_variable(const Scene *scene, PaintStroke *stroke, float pressure, float dpressure, float length) |