diff options
author | BrunoSXS <trustmeiamadeveloper@gmail.com> | 2021-10-23 17:30:18 -0300 |
---|---|---|
committer | BrunoSXS <trustmeiamadeveloper@gmail.com> | 2021-10-23 17:30:18 -0300 |
commit | eb2deabffe7cea3f584ce152781445714cda0ff9 (patch) | |
tree | 46c42b96e97a76a12d8e1fadde38a2597534524c /scene/main/canvas_item.cpp | |
parent | 0aa6f27061ce3d140566fbf076010a4f3ead839b (diff) |
Fixes a game crash caused by instantiating Camera2D and sending a notification from it before adding it to the tree.
Diffstat (limited to 'scene/main/canvas_item.cpp')
-rw-r--r-- | scene/main/canvas_item.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp index 916833c9a7..232c522a47 100644 --- a/scene/main/canvas_item.cpp +++ b/scene/main/canvas_item.cpp @@ -274,6 +274,7 @@ void CanvasItem::_exit_canvas() { void CanvasItem::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { + ERR_FAIL_COND(!is_inside_tree()); _update_texture_filter_changed(false); _update_texture_repeat_changed(false); |