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:
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/src/editmesh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c
index cb7a063e8b2..f1d6e77fc3f 100644
--- a/source/blender/src/editmesh.c
+++ b/source/blender/src/editmesh.c
@@ -385,6 +385,9 @@ EditFace *addfacelist(EditVert *v1, EditVert *v2, EditVert *v3, EditVert *v4, Ed
EditFace *efa;
EditEdge *e1, *e2=0, *e3=0, *e4=0;
+ /* added sanity check... seems to happen for some tools, or for enter editmode for corrupted meshes */
+ if(v1==v4 || v2==v4 || v3==v4) v4= NULL;
+
/* add face to list and do the edges */
if(exampleEdges) {
e1= addedgelist(v1, v2, exampleEdges->e1);