diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-11-28 18:40:58 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-11-28 18:41:29 -0300 |
commit | 5b8dde4b4a5a930e08da51e07ec87f43e5bd7b36 (patch) | |
tree | 57cabe1b548abc097bba2e51a66daa6a91a39078 /scene | |
parent | 43f28452e1cd03bb40f8a9a27fc2239c3b5c2604 (diff) |
Removed error that should not be an error, fixes #21088
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/area_2d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/area.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index ae5891fa50..4a4aaf3238 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -158,7 +158,9 @@ void Area2D::_body_inout(int p_status, const RID &p_body, int p_instance, int p_ Map<ObjectID, BodyState>::Element *E = body_map.find(objid); - ERR_FAIL_COND(!body_in && !E); + if (!body_in && !E) { + return; //does not exist because it was likely removed from the tree + } locked = true; diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp index 5e78368804..ac77ddb7ce 100644 --- a/scene/3d/area.cpp +++ b/scene/3d/area.cpp @@ -157,7 +157,9 @@ void Area::_body_inout(int p_status, const RID &p_body, int p_instance, int p_bo Map<ObjectID, BodyState>::Element *E = body_map.find(objid); - ERR_FAIL_COND(!body_in && !E); + if (!body_in && !E) { + return; //likely removed from the tree + } locked = true; |