Merge pull request #69883 from adamscott/fix-gdscript-cache-clear-crash

Fix `GDScriptCache::clear()` crash when clearing packed scenes
This commit is contained in:
Rémi Verschelde
2022-12-11 09:26:39 +01:00
committed by GitHub

View File

@@ -415,10 +415,8 @@ void GDScriptCache::clear() {
E->clear();
}
for (KeyValue<String, HashSet<String>> &E : singleton->packed_scene_dependencies) {
singleton->packed_scene_dependencies.erase(E.key);
singleton->packed_scene_cache.erase(E.key);
}
singleton->packed_scene_dependencies.clear();
singleton->packed_scene_cache.clear();
parser_map_refs.clear();
singleton->parser_map.clear();