[Bf-blender-cvs] [6c46dff50d5] blender2.8: Curve Edit Mode: Fix crash when the U-resolution of the curve is changed

Germano noreply at git.blender.org
Wed Jan 3 02:10:01 CET 2018


Commit: 6c46dff50d536b241376a0d72dbc4253f1d8ff05
Author: Germano
Date:   Tue Jan 2 23:09:51 2018 -0200
Branches: blender2.8
https://developer.blender.org/rB6c46dff50d536b241376a0d72dbc4253f1d8ff05

Curve Edit Mode: Fix crash when the U-resolution of the curve is changed

`normal_len` did not follow the value of the loop that is executed to add the vertices, being different from the vbo size

===================================================================

M	source/blender/draw/intern/draw_cache_impl_curve.c

===================================================================

diff --git a/source/blender/draw/intern/draw_cache_impl_curve.c b/source/blender/draw/intern/draw_cache_impl_curve.c
index ff8ffd76ac3..d4fd4982328 100644
--- a/source/blender/draw/intern/draw_cache_impl_curve.c
+++ b/source/blender/draw/intern/draw_cache_impl_curve.c
@@ -126,7 +126,7 @@ static int curve_render_normal_len_get(const ListBase *lb, const CurveCache *ob_
 			nr -= skip;
 		}
 #else
-		normal_len += max_ii((nr + max_ii(skip - 1, 0)) / (skip + 1), 0);
+		normal_len += (nr / (skip + 1)) + ((nr % (skip + 1)) != 0);
 #endif
 	}
 	return normal_len;



More information about the Bf-blender-cvs mailing list