Merge pull request #54145 from zedutch/Fix-tree-notification-crash

This commit is contained in:
Rémi Verschelde 2021-10-23 18:33:12 +02:00 committed by GitHub
commit e12fe670e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3570,7 +3570,9 @@ int Tree::_get_title_button_height() const {
void Tree::_notification(int p_what) {
if (p_what == NOTIFICATION_FOCUS_ENTER) {
focus_in_id = get_viewport()->get_processed_events_count();
if (get_viewport()) {
focus_in_id = get_viewport()->get_processed_events_count();
}
}
if (p_what == NOTIFICATION_MOUSE_EXIT) {
if (cache.hover_type != Cache::CLICK_NONE) {