From 624e41d4a3aa411b77b1c3b9d49dc2292500b884 Mon Sep 17 00:00:00 2001 From: kobewi Date: Mon, 29 Dec 2025 20:34:48 +0100 Subject: [PATCH] Prevent crash when adding null Shortcut --- editor/settings/editor_settings.cpp | 2 ++ 1 file changed, 2 insertions(+) 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);