Преглед изворни кода

Fixes leak when creating bullet shape

Rafał Mikrut пре 5 година
родитељ
комит
808615ec3e
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      modules/bullet/space_bullet.cpp

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