From 808615ec3e41d3d64089e852164221281b57511a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= Date: Wed, 5 Aug 2020 10:08:05 +0200 Subject: [PATCH] Fixes leak when creating bullet shape --- modules/bullet/space_bullet.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp index ec9db926f0b..6444c6e3c22 100644 --- a/modules/bullet/space_bullet.cpp +++ b/modules/bullet/space_bullet.cpp @@ -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; }