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:
authorSybren A. Stüvel <sybren@blender.org>2021-11-18 18:21:17 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-11-18 18:21:17 +0300
commitbeb9e332caac7052db20584e61bd832df1efb680 (patch)
tree900c6d32b59e55dfc28703b3979fd2209590875c /source/blender/blenkernel/intern/geometry_component_curve.cc
parentd1f944c18634f215c3da0484ac3b80e994118680 (diff)
parent31afa1bb9abf6adcfcb0efc0e227076fa47d92ba (diff)
Merge remote-tracking branch 'origin/blender-v3.0-release'
Diffstat (limited to 'source/blender/blenkernel/intern/geometry_component_curve.cc')
-rw-r--r--source/blender/blenkernel/intern/geometry_component_curve.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/geometry_component_curve.cc b/source/blender/blenkernel/intern/geometry_component_curve.cc
index 0b80ff5acdf..598c61fd877 100644
--- a/source/blender/blenkernel/intern/geometry_component_curve.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curve.cc
@@ -555,7 +555,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++;
}
@@ -599,7 +600,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++;
}