mirror of
https://github.com/godotengine/godot
synced 2024-09-16 00:27:07 +00:00
Fixes leak when creating bullet shape
This commit is contained in:
parent
9adf6d3441
commit
ac1b2da96e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue