From d36c5514d3893578f1c8cce4d0a2256abfcdd1ed Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Wed, 11 May 2022 15:15:58 +0300 Subject: Fix ZipIO crash when reused (and possible leaks). --- platform/iphone/export/export_plugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'platform/iphone/export/export_plugin.cpp') diff --git a/platform/iphone/export/export_plugin.cpp b/platform/iphone/export/export_plugin.cpp index 57bee59523..71f3b5f59f 100644 --- a/platform/iphone/export/export_plugin.cpp +++ b/platform/iphone/export/export_plugin.cpp @@ -1488,7 +1488,8 @@ Error EditorExportPlatformIOS::export_project(const Ref &p_p ERR_FAIL_COND_V(tmp_app_path.is_null(), ERR_CANT_CREATE); print_line("Unzipping..."); - zlib_filefunc_def io = zipio_create_io(); + Ref io_fa; + zlib_filefunc_def io = zipio_create_io(&io_fa); unzFile src_pkg_zip = unzOpen2(src_pkg_name.utf8().get_data(), &io); if (!src_pkg_zip) { EditorNode::add_io_error("Could not open export template (not a zip file?):\n" + src_pkg_name); -- cgit v1.2.3