Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-06-03 02:54:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-03 02:54:00 +0400
commit99b55ef6eb7d677ead66b4166afe45688147a5b3 (patch)
tree95849d8187634b3f9bbed56c8d5640d5dcadf0ae /source/blender/bmesh
parentad0305281b07eccf0b905d408c5c12765095e2f7 (diff)
add asserts when scanfilling or triangulating with zero length normal.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index cce1808ed3b..3d0ea4e9aed 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -831,6 +831,8 @@ static BMLoop *poly_find_ear(BMFace *f, float (*projectverts)[2], const bool use
const float cos_threshold = 0.9f;
const float bias = 1.0f + 1e-6f;
+ BLI_assert(len_squared_v3(f->no) > FLT_EPSILON);
+
if (f->len == 4) {
BMLoop *larr[4];
int i = 0, i4;