diff options
author | Juan Linietsky <juan@godotengine.org> | 2019-02-22 09:04:59 -0300 |
---|---|---|
committer | Juan Linietsky <juan@godotengine.org> | 2019-02-22 09:05:34 -0300 |
commit | edbf1d0ea49517be80e514595fc71d7069423edb (patch) | |
tree | c710d9b58bbaf69dffd80abbe0cf7012c2bd0c34 /scene/3d | |
parent | 258bc0385762b5d1dceff520e0c4e1c4e4e512a0 (diff) |
Check that area is inside tree besides checking that queries are flushed, fixes #26148
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/area.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp index 99f43b1242..9e15a416b2 100644 --- a/scene/3d/area.cpp +++ b/scene/3d/area.cpp @@ -439,7 +439,7 @@ Array Area::get_overlapping_bodies() const { void Area::set_monitorable(bool p_enable) { - if (locked || PhysicsServer::get_singleton()->is_flushing_queries()) { + if (locked || (is_inside_tree() && PhysicsServer::get_singleton()->is_flushing_queries())) { ERR_EXPLAIN("Function blocked during in/out signal. Use set_deferred(\"monitorable\",true/false)"); } ERR_FAIL_COND(locked || PhysicsServer::get_singleton()->is_flushing_queries()); |