Fix T98698: Division by zero in smear code when strength is zero

This commit is contained in:
Joseph Eagar 2022-07-04 01:17:19 -07:00 committed by Thomas Dinges
parent 9bb9a54a2a
commit b9ad027b44
Notes: blender-bot 2023-02-14 08:38:14 +01:00
Referenced by issue #98698, Blender 3.2.0 - Sculpt's Smear Brush at 0 strength creates black attribute color
Referenced by issue #98661, 3.2: Potential candidates for corrective releases
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}