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:
authorHans Goudey <h.goudey@me.com>2022-06-09 16:40:07 +0300
committerHans Goudey <h.goudey@me.com>2022-06-09 16:40:07 +0300
commit32ee2ffc7d3ed530567b751c5f923ee331b778b9 (patch)
treeac1a1d40dfc1929ddb707e05a4c6198bb7898f93
parent14d1ad8dd8380dab783e6517c437a90cbf73c398 (diff)
Fix: Crash in selection paint brush with empty curves
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_selection_paint.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_selection_paint.cc b/source/blender/editors/sculpt_paint/curves_sculpt_selection_paint.cc
index 30793c45bd0..69615a3bfb4 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_selection_paint.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_selection_paint.cc
@@ -83,6 +83,9 @@ struct SelectionPaintOperationExecutor {
curves_id_ = static_cast<Curves *>(object_->data);
curves_ = &CurvesGeometry::wrap(curves_id_->geometry);
curves_id_->flag |= CV_SCULPT_SELECTION_ENABLED;
+ if (curves_->curves_num() == 0) {
+ return;
+ }
brush_ = BKE_paint_brush_for_read(&ctx_.scene->toolsettings->curves_sculpt->paint);
brush_radius_base_re_ = BKE_brush_size_get(ctx_.scene, brush_);