Merge pull request #41041 from qarmin/leak_bullet_shape

[3.2] Fixes leak when creating bullet shape
This commit is contained in:
Rémi Verschelde 2020-08-10 19:47:08 +02:00 committed by GitHub
commit efbeafd08c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

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