diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-16 14:11:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-16 14:11:14 +0100 |
commit | b99792b5d9e85169b82127efe2ade563cc363b27 (patch) | |
tree | e3faa01593bf1fe9ee556fd8f62ff921aa49f473 /scene/2d | |
parent | 471e7cbfc7d83220e45c16c7336214991ebc5515 (diff) | |
parent | eb2deabffe7cea3f584ce152781445714cda0ff9 (diff) |
Merge pull request #54167 from brunosxs/fix-game-crash-when-sending-a-notification-from-a-camera-class
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/camera_2d.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index b4ee85120e..bf5671be19 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -232,6 +232,7 @@ void Camera2D::_notification(int p_what) { } break; case NOTIFICATION_ENTER_TREE: { + ERR_FAIL_COND(!is_inside_tree()); if (custom_viewport && ObjectDB::get_instance(custom_viewport_id)) { viewport = custom_viewport; } else { |