summaryrefslogtreecommitdiffstats
path: root/platform/uwp/export/export_plugin.h
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-03-23 11:08:58 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-04-11 13:28:51 +0300
commit9381acb6a42da653cb6dfd9e610dfccead11aa98 (patch)
tree7c781fabd1f496345ca73cc362a5f88060af0fde /platform/uwp/export/export_plugin.h
parentca9372622f331f26daf38086a31c4eeea768e540 (diff)
downloadredot-engine-9381acb6a42da653cb6dfd9e610dfccead11aa98.tar.gz
Make FileAccess and DirAccess classes reference counted.
Diffstat (limited to 'platform/uwp/export/export_plugin.h')
-rw-r--r--platform/uwp/export/export_plugin.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/platform/uwp/export/export_plugin.h b/platform/uwp/export/export_plugin.h
index e2a4314ef5..7f10b00dc1 100644
--- a/platform/uwp/export/export_plugin.h
+++ b/platform/uwp/export/export_plugin.h
@@ -346,7 +346,7 @@ class EditorExportPlatformUWP : public EditorExportPlatform {
ERR_FAIL_V_MSG(data, err_string);
}
- FileAccess *f = FileAccess::open(tmp_path, FileAccess::READ, &err);
+ Ref<FileAccess> f = FileAccess::open(tmp_path, FileAccess::READ, &err);
if (err != OK) {
String err_string = "Couldn't open temp logo file.";
@@ -359,8 +359,6 @@ class EditorExportPlatformUWP : public EditorExportPlatform {
data.resize(f->get_length());
f->get_buffer(data.ptrw(), data.size());
- f->close();
- memdelete(f);
DirAccess::remove_file_or_error(tmp_path);
return data;