From 8166f8d3c8259786d2c35db3eb47baedc6c4ce8b Mon Sep 17 00:00:00 2001 From: CatThingy Date: Sun, 14 Apr 2019 19:31:51 -0700 Subject: [PATCH] Removed unnecessary error from _area_inout The error was previously removed from _body_inout for the same reason. Fixes #28022. --- scene/2d/area_2d.cpp | 5 +++-- scene/3d/area.cpp | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index 2a225e57977..b322cfe8f14 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::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 13d9181082e..3557f0425ca 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::Element *E = area_map.find(objid); - ERR_FAIL_COND(!area_in && !E); + if (!area_in && !E) { + return; //likely removed from the tree + } locked = true;