Fix crash when exporting projects with shared libraries
This commit is contained in:
parent
3586f559d1
commit
680bcef825
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue