2
0
Эх сурвалжийг харах

Merge pull request #41041 from qarmin/leak_bullet_shape

[3.2] Fixes leak when creating bullet shape
Rémi Verschelde 5 жил өмнө
parent
commit
efbeafd08c

+ 1 - 0
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;
 	}