[ZoneBuilder] Do security checks before unloading the zones

This commit is contained in:
momo5502 2016-12-24 22:12:25 +01:00
parent 83b25f6348
commit 96d07c14f8

View File

@ -19,17 +19,6 @@ namespace Components
ZoneBuilder::Zone::~Zone()
{
// Unload our fastfiles
Game::XZoneInfo info;
info.name = nullptr;
info.allocFlags = 0;
info.freeFlags = 0x20;
Game::DB_LoadXAssets(&info, 1, true);
AssetHandler::ClearTemporaryAssets();
Localization::ClearTemp();
#ifdef DEBUG
for (auto& subAsset : this->loadedSubAssets)
{
@ -71,6 +60,17 @@ namespace Components
}
}
#endif
// Unload our fastfiles
Game::XZoneInfo info;
info.name = nullptr;
info.allocFlags = 0;
info.freeFlags = 0x20;
Game::DB_LoadXAssets(&info, 1, true);
AssetHandler::ClearTemporaryAssets();
Localization::ClearTemp();
}
Utils::Stream* ZoneBuilder::Zone::getBuffer()