From ebf9eaab55601cae90c044b6c272a4d215d3e9d7 Mon Sep 17 00:00:00 2001 From: rune-scape Date: Fri, 9 Aug 2024 15:28:43 -0700 Subject: [PATCH] GDScriptCache: Invalidate moved script --- modules/gdscript/gdscript_cache.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/gdscript/gdscript_cache.cpp b/modules/gdscript/gdscript_cache.cpp index 6eb35c9ac1f1..a71de7a4862d 100644 --- a/modules/gdscript/gdscript_cache.cpp +++ b/modules/gdscript/gdscript_cache.cpp @@ -155,10 +155,7 @@ void GDScriptCache::move_script(const String &p_from, const String &p_to) { return; } - if (singleton->parser_map.has(p_from) && !p_from.is_empty()) { - singleton->parser_map[p_to] = singleton->parser_map[p_from]; - } - singleton->parser_map.erase(p_from); + remove_parser(p_from); if (singleton->parser_inverse_dependencies.has(p_from) && !p_from.is_empty()) { singleton->parser_inverse_dependencies[p_to] = singleton->parser_inverse_dependencies[p_from];