From ac1b2da96e92261a49a0f8f7f01ebed9402cca07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= Date: Wed, 5 Aug 2020 10:04:04 +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 2b60f8df3636..d0515e7c9743 100644 --- a/modules/bullet/space_bullet.cpp +++ b/modules/bullet/space_bullet.cpp @@ -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; }