diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-10-23 19:00:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-23 19:00:12 +0200 |
commit | e0f887accdd01fc8bb350b09e1e2b663320ac612 (patch) | |
tree | e1af97c3ecb49fa32b73336a3203cb24406dfb9f /scene/2d/ray_cast_2d.cpp | |
parent | e12fe670e6e82ab5386c5c4d0be1ed5037c64143 (diff) | |
parent | 924c2078dae69e73032af04e96200f44187d2c8d (diff) |
Merge pull request #54120 from zaevi/fix_null-ref_crashes
Diffstat (limited to 'scene/2d/ray_cast_2d.cpp')
-rw-r--r-- | scene/2d/ray_cast_2d.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp index 3ac2128c2e..0a8e9e2a58 100644 --- a/scene/2d/ray_cast_2d.cpp +++ b/scene/2d/ray_cast_2d.cpp @@ -157,6 +157,7 @@ void RayCast2D::_notification(int p_what) { } break; case NOTIFICATION_DRAW: { + ERR_FAIL_COND(!is_inside_tree()); if (!Engine::get_singleton()->is_editor_hint() && !get_tree()->is_debugging_collisions_hint()) { break; } |