diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2019-11-12 08:15:29 +0100 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2019-11-12 08:15:29 +0100 |
commit | 47a4ca0022fe961d7dc607f37b0af6b5d0283d2e (patch) | |
tree | f18840173712c1e830afdac637f3b7a061b95862 /scene | |
parent | 5f4ab5c77ded1c078c8e3543727d576d837942e0 (diff) |
Fixed crash when pressing down key on empty Tree
Fixes #33554
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/tree.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index a44b42a467..d479a1636a 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -2224,8 +2224,9 @@ void Tree::_go_down() { TreeItem *next = NULL; if (!selected_item) { - next = hide_root ? root->get_next_visible() : root; - selected_item = 0; + if (root) { + next = hide_root ? root->get_next_visible() : root; + } } else { next = selected_item->get_next_visible(); |