Merged changes in the trunk up to revision 51126.
[blender.git] / source / blender / bmesh / intern / bmesh_construct.c
index 691465388e95cd63e5deac0113ce4210e30d8562..6ccd0cbc491bfdd95e9667640017fc67a2ef1e81 100644 (file)
@@ -902,8 +902,9 @@ BMesh *BM_mesh_copy(BMesh *bm_old)
                }
 
                f2 = BM_face_create_ngon(bm_new, v, v2, edges, f->len, FALSE);
-               if (!f2)
+               if (UNLIKELY(f2 == NULL)) {
                        continue;
+               }
                /* use totface in case adding some faces fails */
                BM_elem_index_set(f2, (bm_new->totface - 1)); /* set_inline */