diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-07-11 21:52:43 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-07-11 21:52:43 +0400 |
commit | db1ab7b1505b630878e527a03b3b3e0b77f590fc (patch) | |
tree | 561f2c390651aa345b4bbe13fe197eba6a9bce68 /source/blender/bmesh/intern/bmesh_mesh.c | |
parent | 4097f9c3c48bcf2df25451c1003f43e8fc0154f3 (diff) |
Fix potential bug in loop normals code.
Even if we cannot use computed lnor, we still have to empty the fan stack of lnors!
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_mesh.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index e66d1263578..c996a5bb6a8 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -641,6 +641,10 @@ static void bm_mesh_loops_calc_normals(BMesh *bm, const float (*vcos)[3], const copy_v3_v3(nor, lnor); } } + else { + /* We still have to clear the stack! */ + while (BLI_SMALLSTACK_POP(normal)); + } } } while ((l_curr = l_curr->next) != l_first); } |