aboutsummaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-04-20 19:38:02 -0300
committerJuan Linietsky2015-04-20 19:38:02 -0300
commit59154cccf9fcf814a21a2596993fb1b6777d3bb7 (patch)
tree4132620a9d924463dae4b64fea2dde68a14023e7 /main/main.cpp
parent28c4afeb5733f9ca9725ab2a5f4066af8e02b2a6 (diff)
downloadgodot-59154cccf9fcf814a21a2596993fb1b6777d3bb7.tar.gz
godot-59154cccf9fcf814a21a2596993fb1b6777d3bb7.tar.zst
godot-59154cccf9fcf814a21a2596993fb1b6777d3bb7.zip
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp
index e753ac5e1..7c687bb0c 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -87,6 +87,9 @@ static MessageQueue *message_queue=NULL;
static Performance *performance = NULL;
static PathRemap *path_remap;
static PackedData *packed_data=NULL;
+#ifdef MINIZIP_ENABLED
+static ZipArchive *zip_packed_data=NULL;
+#endif
static FileAccessNetworkClient *file_access_network_client=NULL;
static TranslationServer *translation_server = NULL;
@@ -248,7 +251,8 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
packed_data = memnew(PackedData);
#ifdef MINIZIP_ENABLED
- packed_data->add_pack_source(ZipArchive::get_singleton());
+ zip_packed_data = ZipArchive::get_singleton();
+ packed_data->add_pack_source(zip_packed_data);
#endif
bool editor=false;
@@ -740,6 +744,15 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
memdelete(packed_data);
if (file_access_network_client)
memdelete(file_access_network_client);
+
+ if (packed_data)
+ memdelete( packed_data );
+#ifdef MINIZIP_ENABLED
+ if (zip_packed_data)
+ memdelete( zip_packed_data );
+#endif
+
+
unregister_core_types();
OS::get_singleton()->_cmdline.clear();