[Bf-blender-cvs] [b9ad027b448] blender-v3.2-release: Fix T98698: Division by zero in smear code when strength is zero
Joseph Eagar
noreply at git.blender.org
Mon Jul 4 16:00:13 CEST 2022
Commit: b9ad027b4482945a548f1c017ec307e475188bf1
Author: Joseph Eagar
Date: Mon Jul 4 01:17:19 2022 -0700
Branches: blender-v3.2-release
https://developer.blender.org/rBb9ad027b4482945a548f1c017ec307e475188bf1
Fix T98698: Division by zero in smear code when strength is zero
===================================================================
M source/blender/editors/sculpt_paint/sculpt_paint_color.c
===================================================================
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;
}
More information about the Bf-blender-cvs
mailing list