diff options
-rw-r--r-- | core/io/dir_access.h | 4 | ||||
-rw-r--r-- | core/io/file_access.h | 4 | ||||
-rw-r--r-- | editor/editor_export.cpp | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/core/io/dir_access.h b/core/io/dir_access.h index d63453e947..b97d097842 100644 --- a/core/io/dir_access.h +++ b/core/io/dir_access.h @@ -137,6 +137,10 @@ struct DirAccessRef { DirAccess *f = nullptr; DirAccessRef(DirAccess *fa) { f = fa; } + DirAccessRef(DirAccessRef &&other) { + f = other.f; + other.f = nullptr; + } ~DirAccessRef() { if (f) { memdelete(f); 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); diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index afb5bd9d4d..bbc104301d 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -1878,7 +1878,6 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr if (err == OK && !so_files.is_empty()) { // If shared object files, copy them. - da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); for (int i = 0; i < so_files.size() && err == OK; i++) { String src_path = ProjectSettings::get_singleton()->globalize_path(so_files[i].path); String target_path; |