소스 검색

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