Browse Source

Removed useless error print on bullet shapes

AndreaCatania 7 years ago
parent
commit
c507a4988d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/bullet/shape_bullet.cpp

+ 1 - 1
modules/bullet/shape_bullet.cpp

@@ -77,7 +77,7 @@ void ShapeBullet::add_owner(ShapeOwnerBullet *p_owner) {
 
 
 void ShapeBullet::remove_owner(ShapeOwnerBullet *p_owner, bool p_permanentlyFromThisBody) {
 void ShapeBullet::remove_owner(ShapeOwnerBullet *p_owner, bool p_permanentlyFromThisBody) {
 	Map<ShapeOwnerBullet *, int>::Element *E = owners.find(p_owner);
 	Map<ShapeOwnerBullet *, int>::Element *E = owners.find(p_owner);
-	ERR_FAIL_COND(!E);
+	if (!E) return;
 	E->get()--;
 	E->get()--;
 	if (p_permanentlyFromThisBody || 0 >= E->get()) {
 	if (p_permanentlyFromThisBody || 0 >= E->get()) {
 		owners.erase(E);
 		owners.erase(E);