Fix T52696: Sculpt - Brush spacing pressure artifacts

Was caused by divide-by-zero in paint_stroke_integrate_overlap()
in paint_stroke.c, as identified by Bob Smith (uvwxyz).

Thanks for the report!
This commit is contained in:
Joshua Leung 2017-09-11 18:24:39 +12:00 committed by Bastien Montagne
parent 904831e62e
commit 9a9e9b1c4d
1 changed files with 4 additions and 1 deletions

View File

@ -580,7 +580,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)