diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-05-11 15:15:58 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-05-11 16:08:17 +0300 |
commit | d36c5514d3893578f1c8cce4d0a2256abfcdd1ed (patch) | |
tree | c591ac745d635c3320f7a858cdd7dd43065a894a /editor/editor_export.cpp | |
parent | 9963ae3553d059e4ac3b57c7a4cdc55d1a87d49a (diff) |
Fix ZipIO crash when reused (and possible leaks).
Diffstat (limited to 'editor/editor_export.cpp')
-rw-r--r-- | editor/editor_export.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index a21ee46818..ef99425f68 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -1334,7 +1334,8 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, b Error EditorExportPlatform::save_zip(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path) { EditorProgress ep("savezip", TTR("Packing"), 102, true); - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); zipFile zip = zipOpen2(p_path.utf8().get_data(), APPEND_STATUS_CREATE, nullptr, &io); ZipData zd; |