summaryrefslogtreecommitdiff
path: root/core/io/file_access.h
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2022-03-23 13:53:32 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2022-03-23 13:53:32 +0800
commit680bcef82546fa0f50b431f20423b62621d1c5ac (patch)
tree3c1f3bfe959c2006dfabf025d09e60eb079f590a /core/io/file_access.h
parent3586f559d1c90b0f455046ea71a8865346538278 (diff)
Fix crash when exporting projects with shared libraries
Diffstat (limited to 'core/io/file_access.h')
-rw-r--r--core/io/file_access.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/io/file_access.h b/core/io/file_access.h
index 5413665440..a6cb5d9fc6 100644
--- a/core/io/file_access.h
+++ b/core/io/file_access.h
@@ -188,6 +188,10 @@ struct FileAccessRef {
operator FileAccess *() { return f; }
FileAccessRef(FileAccess *fa) { f = fa; }
+ FileAccessRef(FileAccessRef &&other) {
+ f = other.f;
+ other.f = nullptr;
+ }
~FileAccessRef() {
if (f) {
memdelete(f);