Do not delete given savefile in GameModel::SetSaveFile, behaviour should be similar to GameModel::SetSave in terms of managing memory in given pointer

This commit is contained in:
Simon Robertshaw 2012-08-08 20:21:59 +01:00
parent 9f1301df5a
commit bd29667355
2 changed files with 1 additions and 1 deletions

View File

@ -717,6 +717,7 @@ void GameController::OpenLocalBrowse()
virtual void FileSelected(SaveFile* file)
{
c->LoadSaveFile(file);
delete file;
}
};
new FileBrowserActivity(LOCAL_SAVE_DIR PATH_SEP, new LocalSaveOpenCallback(this));

View File

@ -398,7 +398,6 @@ void GameModel::SetSaveFile(SaveFile * newSave)
sim->clear_sim();
sim->Load(saveData);
}
delete newSave;
notifySaveChanged();
UpdateQuickOptions();