Fix potential bug in loop normals code.

Even if we cannot use computed lnor, we still have to empty the fan stack of lnors!
This commit is contained in:
Bastien Montagne 2014-07-11 19:52:43 +02:00
parent 4097f9c3c4
commit db1ab7b150
2 changed files with 8 additions and 0 deletions

View File

@ -567,6 +567,10 @@ void BKE_mesh_normals_loop_split(MVert *mverts, const int UNUSED(numVerts), MEdg
copy_v3_v3(nor, lnor);
}
}
else {
/* We still have to clear the stack! */
while (BLI_SMALLSTACK_POP(normal));
}
}
ml_prev = ml_curr;

View File

@ -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);
}