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.
This commit is contained in:
2022-07-28 17:39:10 -05:00
parent 1adeae56e6
commit 6ca602dd9f

View File

@@ -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(