From 32ee2ffc7d3ed530567b751c5f923ee331b778b9 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 9 Jun 2022 15:40:07 +0200 Subject: [PATCH] Fix: Crash in selection paint brush with empty curves --- .../editors/sculpt_paint/curves_sculpt_selection_paint.cc | 3 +++ 1 file changed, 3 insertions(+) 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(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_);