Skip to content
Snippets Groups Projects
Commit c68c3c25 authored by Ton Roosendaal's avatar Ton Roosendaal
Browse files

Fix for crash in Mesh EditMode "Join triangles" (JKEY). Found & code

provided by Campbell Barton, thanks mate! :)

Note; this tool gives quickly bad results... also errors printed in the
give_quad_verts call. Who likes to attack this!
parent 799d7e3f
No related branches found
No related tags found
No related merge requests found
...@@ -2307,6 +2307,7 @@ void join_triangles(void) ...@@ -2307,6 +2307,7 @@ void join_triangles(void)
1-----2 1-----2 1-----2 1-----2
*/ */
/* make new faces */ /* make new faces */
if(v1 && v2 && v3 && v4) {
if( convex(v1->co, v2->co, v3->co, v4->co) ) { if( convex(v1->co, v2->co, v3->co, v4->co) ) {
if(exist_face(v1, v2, v3, v4)==0) { if(exist_face(v1, v2, v3, v4)==0) {
w = addfacelist(v1, v2, v3, v4, efaa[0], NULL); /* seam edge may get broken */ w = addfacelist(v1, v2, v3, v4, efaa[0], NULL); /* seam edge may get broken */
...@@ -2327,6 +2328,7 @@ void join_triangles(void) ...@@ -2327,6 +2328,7 @@ void join_triangles(void)
} /* endif test convex */ } /* endif test convex */
} }
} }
}
eed= nexted; eed= nexted;
} }
free_tagged_edgelist(em->edges.first); free_tagged_edgelist(em->edges.first);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment