fix crash from previous commit

This commit is contained in:
jacob1 2015-12-16 14:06:44 -05:00
parent 8d4e333986
commit 762093371b

View File

@ -1098,11 +1098,12 @@ void GameController::OpenLocalSaveWindow(bool asCurrent)
sim->SaveSimOptions(gameSave);
gameSave->paused = gameModel->GetPaused();
std::string filename = "";
SaveFile tempSave("");
if (gameModel->GetSaveFile())
filename = gameModel->GetSaveFile()->GetName();
SaveFile tempSave(filename);
tempSave.SetDisplayName(gameModel->GetSaveFile()->GetDisplayName());
{
tempSave.SetFileName(gameModel->GetSaveFile()->GetName());
tempSave.SetDisplayName(gameModel->GetSaveFile()->GetDisplayName());
}
tempSave.SetGameSave(gameSave);
if (!asCurrent || !gameModel->GetSaveFile())