Merge pull request #41040 from qarmin/fixes_leak_bulet

Fixes leak when creating bullet shape
This commit is contained in:
Andrea Catania 2020-08-05 13:22:42 +02:00 committed by GitHub
commit 8de57bde13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,6 +177,7 @@ bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transf
bt_xform_to.getOrigin() += bt_motion;
if ((bt_xform_to.getOrigin() - bt_xform_from.getOrigin()).fuzzyZero()) {
shape->destroy_bt_shape(btShape);
return false;
}