Fixes leak when creating bullet shape

This commit is contained in:
Rafał Mikrut 2020-08-05 10:08:05 +02:00
parent 23b553ba06
commit 808615ec3e

View file

@ -179,6 +179,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()) {
bulletdelete(btShape);
return false;
}