[Bf-blender-cvs] [3cf39fc] master: Fix T39740: New Autosmooth instant crash entering Edit Mode
Bastien Montagne
noreply at git.blender.org
Mon Apr 14 23:44:23 CEST 2014
Commit: 3cf39fc72a36bab1c5b82ae96cffe7dd01ce7260
Author: Bastien Montagne
Date: Mon Apr 14 23:42:38 2014 +0200
https://developer.blender.org/rB3cf39fc72a36bab1c5b82ae96cffe7dd01ce7260
Fix T39740: New Autosmooth instant crash entering Edit Mode
One should always be wary of last minute changes, especially in comples code area... :/
===================================================================
M source/blender/bmesh/intern/bmesh_mesh.c
===================================================================
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index bad365a..ee7dc81 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -570,7 +570,13 @@ static void bm_mesh_loops_calc_normals(BMesh *bm, const float (*vcos)[3], const
while (true) {
/* Much simpler than in sibling code with basic Mesh data! */
lfan_pivot_next = BM_vert_step_fan_loop(lfan_pivot, &e_next);
- BLI_assert(lfan_pivot_next->v == v_pivot);
+ if (lfan_pivot_next) {
+ BLI_assert(lfan_pivot_next->v == v_pivot);
+ }
+ else {
+ /* next edge is non-manifold, we have to find it ourselves! */
+ e_next = (lfan_pivot->e == e_next) ? lfan_pivot->prev->e : lfan_pivot->e;
+ }
/* Compute edge vector.
* NOTE: We could pre-compute those into an array, in the first iteration, instead of computing them
More information about the Bf-blender-cvs
mailing list