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-04-14 00:57:13 +0300
committerHans Goudey <h.goudey@me.com>2022-04-14 00:57:13 +0300
commit94495049a8ef2bd5f290e4a5205725e28fa74a66 (patch)
treeaf743e24e3105d794ac562714d8d142547b64d9e /source/blender/blenkernel
parent95236d8a752ee299e4f63a3eb1ff75be78bcada9 (diff)
Fix: Assert evaluating single point Bezier curve
Just return early in that case to keep the rest of the function simpler.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/curve_bezier.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/curve_bezier.cc b/source/blender/blenkernel/intern/curve_bezier.cc
index dfe462d8566..13695525616 100644
--- a/source/blender/blenkernel/intern/curve_bezier.cc
+++ b/source/blender/blenkernel/intern/curve_bezier.cc
@@ -281,6 +281,11 @@ static void interpolate_to_evaluated(const Span<T> src,
BLI_assert(!src.is_empty());
BLI_assert(evaluated_offsets.size() == src.size());
BLI_assert(evaluated_offsets.last() == dst.size());
+ if (src.size() == 1) {
+ BLI_assert(dst.size() == 1);
+ dst.first() = src.first();
+ return;
+ }
linear_interpolation(src.first(), src[1], dst.take_front(evaluated_offsets.first()));