aboutsummaryrefslogtreecommitdiff
path: root/modules/bullet/shape_bullet.cpp
diff options
context:
space:
mode:
authorAndreaCatania2018-01-08 16:49:04 +0100
committerAndreaCatania2018-01-08 16:49:04 +0100
commitc507a4988da699bc00c425dc702ee97e0022fae3 (patch)
tree595d354c523a66f95c04b5f9bf740cd4ffdc7ac2 /modules/bullet/shape_bullet.cpp
parent50c99370d2a8bf109469fe1c97d45c8d6303f1ef (diff)
downloadgodot-c507a4988da699bc00c425dc702ee97e0022fae3.tar.gz
godot-c507a4988da699bc00c425dc702ee97e0022fae3.tar.zst
godot-c507a4988da699bc00c425dc702ee97e0022fae3.zip
Diffstat (limited to 'modules/bullet/shape_bullet.cpp')
-rw-r--r--modules/bullet/shape_bullet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp
index 16b40adce..27eac4e6e 100644
--- a/modules/bullet/shape_bullet.cpp
+++ b/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) {
Map<ShapeOwnerBullet *, int>::Element *E = owners.find(p_owner);
- ERR_FAIL_COND(!E);
+ if (!E) return;
E->get()--;
if (p_permanentlyFromThisBody || 0 >= E->get()) {
owners.erase(E);