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:
parent
9f1301df5a
commit
bd29667355
@ -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));
|
||||
|
@ -398,7 +398,6 @@ void GameModel::SetSaveFile(SaveFile * newSave)
|
||||
sim->clear_sim();
|
||||
sim->Load(saveData);
|
||||
}
|
||||
delete newSave;
|
||||
|
||||
notifySaveChanged();
|
||||
UpdateQuickOptions();
|
||||
|
Loading…
Reference in New Issue
Block a user