diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-12-06 22:39:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-06 22:39:02 +0100 |
commit | c1ed695f32597dd30a5a501568c80463b1dd2575 (patch) | |
tree | b89ab5deb47208de8adaa4283d79942250c1c48f /scene | |
parent | 2f41af7d2d14450e3d400363a43f2f71cde7ef9e (diff) | |
parent | f18de71b5629fe20adde4d1ec7feac671802356f (diff) |
Merge pull request #55659 from timothyqiu/boom
Fix crash when `update()` is called inside `_draw()`
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/canvas_item.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp index 22e3c3bf24..0fd3a963ae 100644 --- a/scene/main/canvas_item.cpp +++ b/scene/main/canvas_item.cpp @@ -275,9 +275,6 @@ 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); - first_draw = true; Node *parent = get_parent(); if (parent) { @@ -306,6 +303,10 @@ void CanvasItem::_notification(int p_what) { } } _enter_canvas(); + + _update_texture_filter_changed(false); + _update_texture_repeat_changed(false); + if (!block_transform_notify && !xform_change.in_list()) { get_tree()->xform_change_list.add(&xform_change); } |