Fixed crash when pressing down key on empty Tree

Fixes #33554
This commit is contained in:
PouleyKetchoupp 2019-11-12 08:15:29 +01:00
parent 5f4ab5c77d
commit 47a4ca0022

View file

@ -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();