Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2022-07-04 11:17:19 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-07-04 11:17:19 +0300
commita720a4aabb44973a87d51e68037c0a694cdd0567 (patch)
tree12544affda8869f1ea02819b218035aca8cacae7 /source/blender/editors/sculpt_paint/sculpt_paint_color.c
parentc5d3846b1026f2a60d3fdd6b61570adcb6c2a2cf (diff)
Fix T98698: Division by zero in smear code when strength is zero
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_paint_color.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_paint_color.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_color.c b/source/blender/editors/sculpt_paint/sculpt_paint_color.c
index 2ac0dbdb9d4..ed56138adca 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;
}