summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatThingy <andyc.andychen@gmail.com>2019-04-14 19:31:51 -0700
committerCatThingy <andyc.andychen@gmail.com>2019-04-15 09:19:30 -0700
commit8166f8d3c8259786d2c35db3eb47baedc6c4ce8b (patch)
tree2a0a9f0188a93bfca5df1dc5424a885457841bbd
parent42032669238bdc807bc7b8f03fff87e6cb5847f1 (diff)
Removed unnecessary error from _area_inout
The error was previously removed from _body_inout for the same reason. Fixes #28022.
-rw-r--r--scene/2d/area_2d.cpp5
-rw-r--r--scene/3d/area.cpp4
2 files changed, 6 insertions, 3 deletions
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index 2a225e5797..b322cfe8f1 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -261,8 +261,9 @@ void Area2D::_area_inout(int p_status, const RID &p_area, int p_instance, int p_
Map<ObjectID, AreaState>::Element *E = area_map.find(objid);
- ERR_FAIL_COND(!area_in && !E);
-
+ if (!area_in && !E) {
+ return; //likely removed from the tree
+ }
locked = true;
if (area_in) {
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp
index 13d9181082..3557f0425c 100644
--- a/scene/3d/area.cpp
+++ b/scene/3d/area.cpp
@@ -356,7 +356,9 @@ void Area::_area_inout(int p_status, const RID &p_area, int p_instance, int p_ar
Map<ObjectID, AreaState>::Element *E = area_map.find(objid);
- ERR_FAIL_COND(!area_in && !E);
+ if (!area_in && !E) {
+ return; //likely removed from the tree
+ }
locked = true;