STARK: Don't save the state when shutting down the data provider

Half the objects are gone, the save can't be consistent.
Fixes valgrind errors on exit.
This commit is contained in:
Bastien Bouclet 2016-01-01 19:07:32 +01:00
parent a58f7f55f7
commit f17b5b5443
2 changed files with 1 additions and 6 deletions

View File

@ -52,7 +52,7 @@ protected:
void printData() override;
Common::String _filename;
uint32 _diaryAddEntryOnPlay;
bool _diaryAddEntryOnPlay;
uint32 _gameDisc;
};

View File

@ -346,9 +346,6 @@ void ResourceProvider::shutdown() {
for (CurrentList::const_iterator it = _locations.begin(); it != _locations.end(); it++) {
Current *location = *it;
_stateProvider->saveLocationState(location->getLevel(), location->getLocation());
_stateProvider->saveLevelState(location->getLevel());
_archiveLoader->returnRoot(_archiveLoader->buildArchiveName(location->getLevel(), location->getLocation()));
_archiveLoader->returnRoot(_archiveLoader->buildArchiveName(location->getLevel()));
@ -357,8 +354,6 @@ void ResourceProvider::shutdown() {
_locations.clear();
// Return the global resources
_stateProvider->saveLevelState(_global->getLevel());
_archiveLoader->returnRoot(_archiveLoader->buildArchiveName(_global->getLevel()));
_archiveLoader->returnRoot("x.xarc");