[Bf-blender-cvs] [0d766aa] master: Some minor fixes from latest coverity scan, nothing crucial here.

Bastien Montagne noreply at git.blender.org
Sun Feb 8 16:27:14 CET 2015


Commit: 0d766aa5327098b2b0fa1eb9af88533025a3153d
Author: Bastien Montagne
Date:   Sun Feb 8 16:26:45 2015 +0100
Branches: master
https://developer.blender.org/rB0d766aa5327098b2b0fa1eb9af88533025a3153d

Some minor fixes from latest coverity scan, nothing crucial here.

===================================================================

M	source/blender/blenkernel/intern/mesh_evaluate.c

===================================================================

diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index 5520653..40a09eb 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) {




More information about the Bf-blender-cvs mailing list