assertion when bvhtree_from_mesh_faces is called and tessfaces dont exist.

This commit is contained in:
Campbell Barton 2012-01-23 20:46:38 +00:00
parent 92aa15805d
commit d65a5a92f9

@ -574,6 +574,13 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
int i;
int numFaces= mesh->getNumTessFaces(mesh);
/* BMESH spesific check that we have tessfaces,
* we _could_ tesselate here but rather not - campbell
*
* this assert checks we have tessfaces,
* if not caller should use DM_ensure_tessface() */
BLI_assert(!(numFaces == 0 && mesh->getNumPolys(mesh) != 0));
if(numFaces != 0)
{
/* Create a bvh-tree of the given target */