Fix GDScriptCache::clear() crash when clearing packed scenes

This commit is contained in:
Adam Scott 2022-12-10 18:56:34 -05:00
parent a4131b61b1
commit 0139bd04b2

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();