Fix: error when materializing curve point attribute

Differential Revision: https://developer.blender.org/D13271
This commit is contained in:
Jacques Lucke 2021-11-18 15:28:04 +01:00
parent f71813204c
commit b926f54f3c
1 changed files with 4 additions and 2 deletions

View File

@ -563,7 +563,8 @@ static void point_attribute_materialize(Span<Span<T>> data,
else {
int spline_index = 0;
for (const int dst_index : mask) {
while (offsets[spline_index] < dst_index) {
/* Skip splines that don't have any control points in the mask. */
while (dst_index >= offsets[spline_index + 1]) {
spline_index++;
}
@ -607,7 +608,8 @@ static void point_attribute_materialize_to_uninitialized(Span<Span<T>> data,
else {
int spline_index = 0;
for (const int dst_index : mask) {
while (offsets[spline_index] < dst_index) {
/* Skip splines that don't have any control points in the mask. */
while (dst_index >= offsets[spline_index + 1]) {
spline_index++;
}