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:
-rw-r--r--source/blender/blenkernel/BKE_curves.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh
index fe2c6196221..1e96c0e4c41 100644
--- a/source/blender/blenkernel/BKE_curves.hh
+++ b/source/blender/blenkernel/BKE_curves.hh
@@ -412,7 +412,7 @@ namespace curves {
inline int curve_segment_size(const int points_num, const bool cyclic)
{
BLI_assert(points_num > 0);
- return cyclic ? points_num : points_num - 1;
+ return (cyclic && points_num > 1) ? points_num : points_num - 1;
}
inline float2 encode_surface_bary_coord(const float3 &v)