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
committerThomas Dinges <blender@dingto.org>2022-07-04 16:42:07 +0300
commitb9ad027b4482945a548f1c017ec307e475188bf1 (patch)
tree8c163d3636b727b625e3808a0ac2504a8c86d102
parent9bb9a54a2aec6787a833f08da66d9a117c059ce1 (diff)
Fix T98698: Division by zero in smear code when strength is zero
-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 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;
}