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:
authorCampbell Barton <ideasman42@gmail.com>2014-05-28 14:49:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-05-28 14:50:05 +0400
commit67f5af05317862b4a3440f02ba6ad2fdfaa827f3 (patch)
treebaad95a138e9819a70dc814cde23326a34d929d9 /source/blender/blenkernel
parent9dbd5771841c2d19aae494c9895879514e1a2f95 (diff)
Add asserts to BKE_mesh_normals_loop_split
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/mesh_evaluate.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index 4bd6d284343..cad436c0111 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -466,6 +466,10 @@ void BKE_mesh_normals_loop_split(MVert *mverts, const int UNUSED(numVerts), MEdg
mlfan_vert_index = ml_curr_index;
mpfan_curr_index = mp_index;
+ BLI_assert(mlfan_curr_index >= 0);
+ BLI_assert(mlfan_vert_index >= 0);
+ BLI_assert(mpfan_curr_index >= 0);
+
/* Only need to compute previous edge's vector once, then we can just reuse old current one! */
{
const MEdge *me_prev = &medges[ml_curr->e]; /* ml_curr would be mlfan_prev if we needed that one */
@@ -521,6 +525,10 @@ void BKE_mesh_normals_loop_split(MVert *mverts, const int UNUSED(numVerts), MEdg
*/
mlfan_curr_index = (e2lfan_curr[0] == mlfan_curr_index) ? e2lfan_curr[1] : e2lfan_curr[0];
mpfan_curr_index = loop_to_poly[mlfan_curr_index];
+
+ BLI_assert(mlfan_curr_index >= 0);
+ BLI_assert(mpfan_curr_index >= 0);
+
mlfan_next = &mloops[mlfan_curr_index];
mpfan_next = &mpolys[mpfan_curr_index];
if ((mlfan_curr->v == mlfan_next->v && mlfan_curr->v == mv_pivot_index) ||