1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

#994 should not crash anymore.

This commit is contained in:
Michał W. Urbańczyk
2012-06-09 19:58:17 +00:00
parent cdb55500f3
commit e6ebf42308
4 changed files with 49 additions and 23 deletions

View File

@@ -761,8 +761,15 @@ void YourTurn::applyCl( CClient *cl )
void SaveGame::applyCl(CClient *cl)
{
CSaveFile save(GVCMIDirs.UserPath + "/Games/" + fname + ".vcgm1");
save << *cl;
try
{
CSaveFile save(GVCMIDirs.UserPath + "/Games/" + fname + ".vcgm1");
save << *cl;
}
catch(std::exception &e)
{
tlog1 << "Failed to save game:" << e.what() << std::endl;
}
}
void PlayerMessage::applyCl(CClient *cl)