aboutsummaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-05-11 15:49:41 -0300
committerJuan Linietsky2015-05-11 15:49:41 -0300
commit4b8745ad63409cf14b02735981ee35d2f794421c (patch)
tree607dcfbb77430e8ed7eef25de6b7bec9c4032aec /main/main.cpp
parentdda60296d81edaabfdb56f47a2c949b5dad283fb (diff)
parentb777bf5ff5c3891daa0f93987ca12d0d7d053c2b (diff)
downloadgodot-4b8745ad63409cf14b02735981ee35d2f794421c.tar.gz
godot-4b8745ad63409cf14b02735981ee35d2f794421c.tar.zst
godot-4b8745ad63409cf14b02735981ee35d2f794421c.zip
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/main/main.cpp b/main/main.cpp
index a822418ea..1469ce461 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -251,7 +251,14 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
packed_data = memnew(PackedData);
#ifdef MINIZIP_ENABLED
+
+ //XXX: always get_singleton() == 0x0
zip_packed_data = ZipArchive::get_singleton();
+ //TODO: remove this temporary fix
+ if (!zip_packed_data) {
+ zip_packed_data = memnew(ZipArchive);
+ }
+
packed_data->add_pack_source(zip_packed_data);
#endif
@@ -748,12 +755,12 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
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
+// Note 1: *zip_packed_data live into *packed_data
+// Note 2: PackedData::~PackedData destroy this.
+//#ifdef MINIZIP_ENABLED
+// if (zip_packed_data)
+// memdelete( zip_packed_data );
+//#endif
unregister_core_types();