diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 9acbdeeceea..97d507e7a12 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -472,7 +472,7 @@ void Control::_notification(int p_notification) { } break; case NOTIFICATION_EXIT_TREE: { ERR_FAIL_COND(!get_viewport()); - + release_focus(); get_viewport()->_gui_remove_control(this); } break;