diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-16 10:35:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-16 10:35:29 +0200 |
commit | f7b5fa8cf2a1806bb5bd7ea200bbe603e4bcfb62 (patch) | |
tree | 54fa11694a8653de4ce25976b3192e9b487fea5c /scene | |
parent | 4f81945fedd26d6dcf34536963318f6b412b762e (diff) | |
parent | 8166f8d3c8259786d2c35db3eb47baedc6c4ce8b (diff) |
Merge pull request #28038 from CatThingy/area-error-fix
Removed unnecessary error from _area_inout
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/area_2d.cpp | 5 | ||||
-rw-r--r-- | 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 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; |