From b9ad027b4482945a548f1c017ec307e475188bf1 Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Mon, 4 Jul 2022 01:17:19 -0700 Subject: Fix T98698: Division by zero in smear code when strength is zero --- source/blender/editors/sculpt_paint/sculpt_paint_color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_color.c b/source/blender/editors/sculpt_paint/sculpt_paint_color.c index fa9f24377da..e91aa74717a 100644 --- a/source/blender/editors/sculpt_paint/sculpt_paint_color.c +++ b/source/blender/editors/sculpt_paint/sculpt_paint_color.c @@ -532,7 +532,7 @@ void SCULPT_do_smear_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode Brush *brush = BKE_paint_brush(&sd->paint); SculptSession *ss = ob->sculpt; - if (!SCULPT_has_colors(ss)) { + if (!SCULPT_has_colors(ss) || ss->cache->bstrength == 0.0f) { return; } -- cgit v1.2.3