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 /platform/javascript/export/export_plugin.cpp | |
parent | 9963ae3553d059e4ac3b57c7a4cdc55d1a87d49a (diff) | |
download | redot-engine-d36c5514d3893578f1c8cce4d0a2256abfcdd1ed.tar.gz |
Fix ZipIO crash when reused (and possible leaks).
Diffstat (limited to 'platform/javascript/export/export_plugin.cpp')
-rw-r--r-- | platform/javascript/export/export_plugin.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/javascript/export/export_plugin.cpp b/platform/javascript/export/export_plugin.cpp index 66d93d7c49..9576256d03 100644 --- a/platform/javascript/export/export_plugin.cpp +++ b/platform/javascript/export/export_plugin.cpp @@ -33,7 +33,8 @@ #include "core/config/project_settings.h" Error EditorExportPlatformJavaScript::_extract_template(const String &p_template, const String &p_dir, const String &p_name, bool pwa) { - zlib_filefunc_def io = zipio_create_io(); + Ref<FileAccess> io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); unzFile pkg = unzOpen2(p_template.utf8().get_data(), &io); if (!pkg) { |