diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp index 8c8d79948a0..03b77a4aab9 100644 --- a/core/io/resource_format_xml.cpp +++ b/core/io/resource_format_xml.cpp @@ -1796,6 +1796,7 @@ Error ResourceInteractiveLoaderXML::rename_dependencies(FileAccess *p_f, const S fw->store_8(c); c=f->get_8(); } + f->close(); bool all_ok = fw->get_error()==OK; diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp index 46f1d5c02e6..6bd5f520d26 100644 --- a/scene/resources/scene_format_text.cpp +++ b/scene/resources/scene_format_text.cpp @@ -736,6 +736,7 @@ Error ResourceInteractiveLoaderText::rename_dependencies(FileAccess *p_f, const fw->store_8(c); c=f->get_8(); } + f->close(); bool all_ok = fw->get_error()==OK;