mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 20:36:53 +01:00
Fix crash when exporting projects with shared libraries
(cherry picked from commit 680bcef82546fa0f50b431f20423b62621d1c5ac)
This commit is contained in:
parent
92561386ec
commit
10eba686fb
@ -146,6 +146,10 @@ struct DirAccessRef {
|
||||
operator bool() const { return f != nullptr; }
|
||||
DirAccess *f;
|
||||
DirAccessRef(DirAccess *fa) { f = fa; }
|
||||
DirAccessRef(DirAccessRef &&other) {
|
||||
f = other.f;
|
||||
other.f = nullptr;
|
||||
}
|
||||
~DirAccessRef() {
|
||||
if (f) {
|
||||
memdelete(f);
|
||||
|
@ -185,6 +185,10 @@ struct FileAccessRef {
|
||||
FileAccess *f;
|
||||
operator FileAccess *() { return f; }
|
||||
FileAccessRef(FileAccess *fa) { f = fa; }
|
||||
FileAccessRef(FileAccessRef &&other) {
|
||||
f = other.f;
|
||||
other.f = nullptr;
|
||||
}
|
||||
~FileAccessRef() {
|
||||
if (f) {
|
||||
memdelete(f);
|
||||
|
@ -1691,8 +1691,7 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr
|
||||
}
|
||||
|
||||
if (err == OK && !so_files.empty()) {
|
||||
//if shared object files, copy them
|
||||
da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
||||
// If shared object files, copy them.
|
||||
for (int i = 0; i < so_files.size() && err == OK; i++) {
|
||||
err = da->copy(so_files[i].path, p_path.get_base_dir().plus_file(so_files[i].path.get_file()));
|
||||
if (err == OK) {
|
||||
|
Loading…
Reference in New Issue
Block a user