diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index cea50cb5f..06ba1d492 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -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)); diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index a53bba277..91ddd53e2 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -398,7 +398,6 @@ void GameModel::SetSaveFile(SaveFile * newSave) sim->clear_sim(); sim->Load(saveData); } - delete newSave; notifySaveChanged(); UpdateQuickOptions();