Merge pull request #33557 from nekomatata/empty-tree-crash

Fixed crash when pressing down key on empty Tree
This commit is contained in:
Rémi Verschelde 2019-11-12 08:38:43 +01:00 committed by GitHub
commit 88a8f9ab36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -2224,8 +2224,9 @@ void Tree::_go_down() {
TreeItem *next = NULL; TreeItem *next = NULL;
if (!selected_item) { if (!selected_item) {
if (root) {
next = hide_root ? root->get_next_visible() : root; next = hide_root ? root->get_next_visible() : root;
selected_item = 0; }
} else { } else {
next = selected_item->get_next_visible(); next = selected_item->get_next_visible();