diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-02-08 18:26:45 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-02-08 18:26:45 +0300 |
commit | 0d766aa5327098b2b0fa1eb9af88533025a3153d (patch) | |
tree | 825ec5dae08a70c883dae94bd128b974e521f096 /source/blender | |
parent | dd65a44c9a192d62f7661090682ee0dc99fb0491 (diff) |
Some minor fixes from latest coverity scan, nothing crucial here.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_evaluate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c index 5520653d3de..40a09eba658 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.c +++ b/source/blender/blenkernel/intern/mesh_evaluate.c @@ -387,6 +387,7 @@ void BKE_lnor_space_define(MLoopNorSpace *lnor_space, const float lnor[3], BLI_stack_discard(edge_vectors); nbr++; } + BLI_assert(nbr > 2); /* This piece of code shall only be called for more than one loop... */ lnor_space->ref_alpha = alpha / (float)nbr; } else { @@ -1343,7 +1344,7 @@ static void mesh_normals_loop_custom_set( while (loops) { const int lidx = GET_INT_FROM_POINTER(loops->link); MLoop *ml = &mloops[lidx]; - const int nidx = use_vertices ? (int)ml->v : lidx; + const int nidx = lidx; float *nor = custom_loopnors[nidx]; if (!org_nor) { |