diff options
-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(); |