=bmesh= fixed dissolve verts crash
authorJoseph Eagar <joeedh@gmail.com>
Mon, 9 May 2011 21:55:15 +0000 (21:55 +0000)
committerJoseph Eagar <joeedh@gmail.com>
Mon, 9 May 2011 21:55:15 +0000 (21:55 +0000)
source/blender/bmesh/intern/bmesh_newcore.c

index 475dfedc819ceb1d384bfe557da6aaa3fd5d14e5..eebd63fc5c4bbbe68353ac2eaa1f0b19920ddd6e 100644 (file)
@@ -931,8 +931,9 @@ BMFace *BM_Join_Faces(BMesh *bm, BMFace **faces, int totface)
 
        /*create region face*/
        newf = BM_Make_Ngon(bm, v1, v2, edges, tote, 0);
-       if (!newf) {
-               err = "Invalid boundary region to join faces";
+       if (!newf || BMO_HasError(bm)) {
+               if (!BMO_HasError(bm)) 
+                       err = "Invalid boundary region to join faces";
                goto error;
        }
 
@@ -965,7 +966,7 @@ BMFace *BM_Join_Faces(BMesh *bm, BMFace **faces, int totface)
 
                l = l->next;
        } while (l != bm_firstfaceloop(newf));
-
+       
        BM_Copy_Attributes(bm, bm, faces[0], newf);
 
        /*add holes*/