summaryrefslogtreecommitdiff
path: root/scene/2d/area_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/area_2d.cpp')
-rw-r--r--scene/2d/area_2d.cpp4
1 files changed, 3 insertions, 1 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;