diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-05-09 13:09:20 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-05-09 13:09:20 -0300 |
commit | 1fd1b7a91b2f60a2841b9684e1e41728275cedaf (patch) | |
tree | 17678512dde4890e941c78ba90ba23b184e2ae9a /main/main.cpp | |
parent | 1a7d370fcf7382a9e248925a7eef12d28e0bb9e3 (diff) | |
parent | 158785636c809d5ebdb6995a088c7776ce45e65c (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/main/main.cpp b/main/main.cpp index aa4a4b8919..1469ce4618 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,10 +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); -#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(); |