diff --git a/editor/settings/editor_settings.cpp b/editor/settings/editor_settings.cpp index f747bd757f..2cea19a518 100644 --- a/editor/settings/editor_settings.cpp +++ b/editor/settings/editor_settings.cpp @@ -1928,6 +1928,8 @@ void EditorSettings::_add_shortcut_default(const String &p_path, const Ref &p_shortcut) { + ERR_FAIL_COND_MSG(p_shortcut.is_null(), "Cannot add a null shortcut for path: " + p_path); + Array use_events = p_shortcut->get_events(); if (shortcuts.has(p_path)) { Ref existing = shortcuts.get(p_path);