Fixed possible problems if another crash occurs while saving crash state
parent
e015d9f1c3
commit
d97042e252
|
@ -172,11 +172,11 @@ void CSignalHandlers::ReportError(const std::string& errorMessage)
|
||||||
SystemDialogResult result = m_systemUtils->SystemDialog(SDT_YES_NO, "Try to save?", msg.str());
|
SystemDialogResult result = m_systemUtils->SystemDialog(SDT_YES_NO, "Try to save?", msg.str());
|
||||||
if (result == SDR_YES)
|
if (result == SDR_YES)
|
||||||
{
|
{
|
||||||
|
triedSaving = true;
|
||||||
CResourceManager::CreateDirectory("crashsave");
|
CResourceManager::CreateDirectory("crashsave");
|
||||||
robotMain->IOWriteScene("crashsave/data.sav", "crashsave/cbot.run", "crashsave/screen.png", "Backup at the moment of a crash", true);
|
robotMain->IOWriteScene("crashsave/data.sav", "crashsave/cbot.run", "crashsave/screen.png", "Backup at the moment of a crash", true);
|
||||||
m_systemUtils->SystemDialog(SDT_INFO, "Try to save?", "Saving finished.\nPlease restart the game now");
|
m_systemUtils->SystemDialog(SDT_INFO, "Try to save?", "Saving finished.\nPlease restart the game now");
|
||||||
}
|
}
|
||||||
triedSaving = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Reference in New Issue