diff --git a/editor/settings/input_event_configuration_dialog.cpp b/editor/settings/input_event_configuration_dialog.cpp index 194f963b17..15dcbd5e68 100644 --- a/editor/settings/input_event_configuration_dialog.cpp +++ b/editor/settings/input_event_configuration_dialog.cpp @@ -49,7 +49,7 @@ void InputEventConfigurationDialog::_set_event(const Ref &p_event, c Ref current_key = p_event; // Without this is_visible() check, the gui would not open if the already bound // keybind was escape. - if (is_visible()) { + if (current_key.is_valid() && is_visible()) { if (current_key->get_physical_keycode() == Key::ENTER) { _ok_pressed(); return;