summaryrefslogtreecommitdiff
path: root/scene/3d/area.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/area.cpp')
-rw-r--r--scene/3d/area.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp
index 5e78368804..99f43b1242 100644
--- a/scene/3d/area.cpp
+++ b/scene/3d/area.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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;
@@ -751,6 +753,7 @@ Area::Area() :
angular_damp = 1;
priority = 0;
monitoring = false;
+ monitorable = false;
collision_mask = 1;
collision_layer = 1;
set_ray_pickable(false);