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-04-19 20:09:09 +0300
committerHans Goudey <h.goudey@me.com>2022-04-19 20:09:29 +0300
commit5a069967222ebb9d439aecc6dd85d9a5286a2344 (patch)
tree5d4e8e5a0237290547b749e875555155b490825d /source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc
parent67962824e9f740cf4daf4c3328657e743c54258b (diff)
Fix: Assert when sculpting empty curves
Diffstat (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc b/source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc
index b367c5bb6ec..6d930d35f04 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc
@@ -116,6 +116,9 @@ struct SnakeHookOperatorExecutor {
curves_id_ = static_cast<Curves *>(object_->data);
curves_ = &CurvesGeometry::wrap(curves_id_->geometry);
+ if (curves_->curves_num() == 0) {
+ return;
+ }
brush_pos_prev_re_ = self.last_mouse_position_re_;
brush_pos_re_ = stroke_extension.mouse_position;