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:
authorGermano <germano.costa@ig.com.br>2018-01-03 04:09:51 +0300
committerGermano <germano.costa@ig.com.br>2018-01-03 04:09:51 +0300
commit6c46dff50d536b241376a0d72dbc4253f1d8ff05 (patch)
tree70263cc13e35bfa5388f197739294bae25bfc020 /source/blender/draw/intern/draw_cache_impl_curve.c
parentb3c4e30a7c3587ceed5854cc2f6e343c391abfb1 (diff)
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
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_curve.c')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_curve.c2
1 files changed, 1 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 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;