forked from bartvdbraak/blender
assertion when bvhtree_from_mesh_faces is called and tessfaces dont exist.
This commit is contained in:
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user