Fix (unreported) potentially giant memory leak in Cloth collision solver.

Not freeing its BVHTree in case there were no collision objects,
could quickly lead to hundreds of MB of memleak!
This commit is contained in:
Bastien Montagne
2018-09-03 15:30:33 +02:00
parent 107f1c0a2b
commit c6bbe6c5aa

View File

@@ -1357,6 +1357,7 @@ void cloth_find_point_contacts(Object *ob, ClothModifierData *clmd, float step,
if (!collobjs) {
*r_collider_contacts = NULL;
*r_totcolliders = 0;
BLI_bvhtree_free(cloth_bvh);
return;
}