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-07-29 01:39:10 +0300
committerHans Goudey <h.goudey@me.com>2022-07-29 01:39:10 +0300
commit6ca602dd9fa14faf75a4b21faccc8c5662b9e79e (patch)
tree7fc46f7b6972f5fa2d622569f608da348af6051f /source/blender/editors/curves
parent1adeae56e61e3c75fed2fe41942a57e7bc150bfb (diff)
Fix T99761: Curves sculpt mode crash with empty curves
The virtual arrays may be null if the curves are empty, it's simple to just skip the domain interpolation completely.
Diffstat (limited to 'source/blender/editors/curves')
-rw-r--r--source/blender/editors/curves/intern/curves_ops.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/curves/intern/curves_ops.cc b/source/blender/editors/curves/intern/curves_ops.cc
index 740e53b59f8..eec2c5d205d 100644
--- a/source/blender/editors/curves/intern/curves_ops.cc
+++ b/source/blender/editors/curves/intern/curves_ops.cc
@@ -755,6 +755,9 @@ static int curves_set_selection_domain_exec(bContext *C, wmOperator *op)
CurvesGeometry &curves = CurvesGeometry::wrap(curves_id->geometry);
bke::MutableAttributeAccessor attributes = curves.attributes_for_write();
+ if (curves.points_num() == 0) {
+ continue;
+ }
if (old_domain == ATTR_DOMAIN_POINT && domain == ATTR_DOMAIN_CURVE) {
VArray<float> curve_selection = curves.adapt_domain(