Fix: Assert when sculpting empty curves
This commit is contained in:
@@ -136,6 +136,9 @@ struct CombOperationExecutor {
|
||||
|
||||
curves_id_ = static_cast<Curves *>(object_->data);
|
||||
curves_ = &CurvesGeometry::wrap(curves_id_->geometry);
|
||||
if (curves_->curves_num() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
brush_pos_prev_re_ = self_->brush_pos_last_re_;
|
||||
brush_pos_re_ = stroke_extension.mouse_position;
|
||||
|
||||
@@ -311,6 +311,9 @@ struct CurvesEffectOperationExecutor {
|
||||
|
||||
curves_id_ = static_cast<Curves *>(object_->data);
|
||||
curves_ = &CurvesGeometry::wrap(curves_id_->geometry);
|
||||
if (curves_->curves_num() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
CurvesSculpt &curves_sculpt = *scene_->toolsettings->curves_sculpt;
|
||||
brush_ = BKE_paint_brush(&curves_sculpt.paint);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user