diff options
author | Germano <germano.costa@ig.com.br> | 2018-01-03 04:31:28 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2018-01-03 04:31:28 +0300 |
commit | 2a57a464410e7089fe31e5dcdc8415408ed4e5f3 (patch) | |
tree | f7a2ea844ebb84a0da2b55f8dd52b8bd1a091d67 /source | |
parent | 6c46dff50d536b241376a0d72dbc4253f1d8ff05 (diff) |
Fix crash when you change the curve resolution in Edit Mode of the Blender Render engine
Same problem as previous commit, but now in `drawobject.c`.
Also added a comment to the equivalent line in `draw_cache_imp_curve.c`.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_curve.c | 1 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_curve.c b/source/blender/draw/intern/draw_cache_impl_curve.c index d4fd4982328..a6dc52f66c9 100644 --- a/source/blender/draw/intern/draw_cache_impl_curve.c +++ b/source/blender/draw/intern/draw_cache_impl_curve.c @@ -126,6 +126,7 @@ static int curve_render_normal_len_get(const ListBase *lb, const CurveCache *ob_ nr -= skip; } #else + /* Same as loop above */ normal_len += (nr / (skip + 1)) + ((nr % (skip + 1)) != 0); #endif } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 50d3593aef6..16a15015e14 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -7405,7 +7405,7 @@ static void draw_editnurb( } #else /* Same as loop above */ - count += 4 * max_ii((nr + max_ii(skip - 1, 0)) / (skip + 1), 0); + count += (nr / (skip + 1)) + ((nr % (skip + 1)) != 0); #endif } |