#54143 Fix potential null pointer dereference

This commit is contained in:
Bastien JAUNY 2021-10-23 14:47:02 +02:00
parent 5e92619a64
commit e74db1de23

View File

@ -2795,8 +2795,10 @@ int Tree::_get_title_button_height() const {
void Tree::_notification(int p_what) {
if (p_what == NOTIFICATION_FOCUS_ENTER) {
if (get_tree()) {
focus_in_id = get_tree()->get_event_count();
}
}
if (p_what == NOTIFICATION_MOUSE_EXIT) {
if (cache.hover_type != Cache::CLICK_NONE) {
cache.hover_type = Cache::CLICK_NONE;