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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user