summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-04-12 10:12:40 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-04-12 10:54:39 +0300
commit4bf99f4af2c4918883c4382ead7de275fae21eea (patch)
treee741cea7e9395dcffeaa986f34e19819564356fb /core/os
parent5974e1432ef7941a5e29f8723dec85aa45505963 (diff)
Narrow FileAccess scope to prevent deadlocks.
Diffstat (limited to 'core/os')
-rw-r--r--core/os/os.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp
index bf6cd4c9ab..846aeb16c5 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -201,14 +201,14 @@ void OS::print_all_resources(String p_to_file) {
Error err;
_OSPRF = FileAccess::open(p_to_file, FileAccess::WRITE, &err);
if (err != OK) {
- _OSPRF = Ref<FileAccess>();
+ _OSPRF.unref();
ERR_FAIL_MSG("Can't print all resources to file: " + String(p_to_file) + ".");
}
}
ObjectDB::debug_objects(_OS_printres);
- _OSPRF = Ref<FileAccess>();
+ _OSPRF.unref();
}
void OS::print_resources_in_use(bool p_short) {