diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-05-28 14:49:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-05-28 14:50:05 +0400 |
commit | 67f5af05317862b4a3440f02ba6ad2fdfaa827f3 (patch) | |
tree | baad95a138e9819a70dc814cde23326a34d929d9 /source/blender/blenkernel/intern/mesh_evaluate.c | |
parent | 9dbd5771841c2d19aae494c9895879514e1a2f95 (diff) |
Add asserts to BKE_mesh_normals_loop_split
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_evaluate.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_evaluate.c | 8 |
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) || |