mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
* Probably fixed #655.
* Fixed #736, #737. * Fixed crash on loss/victory. * Fixed crash on loading some AB maps. * Fixed crash on loading map where victory/loss condition objective hero was placed inside the town. * Fixed crash on loading map when neutral Dungeon has built Portal of Summoning. * Mutex protecting GS will be used to prevent changes in GS when GUI might read it. * Little more securities around moving hero and ending turn, still needed more.
This commit is contained in:
@@ -201,6 +201,10 @@ void CClient::endGame( bool closeConnection /*= true*/ )
|
||||
{
|
||||
// Game is ending
|
||||
// Tell the network thread to reach a stable state
|
||||
if(closeConnection)
|
||||
stopConnection();
|
||||
tlog0 << "Closed connection." << std::endl;
|
||||
|
||||
GH.curInt = NULL;
|
||||
LOCPLINT->terminate_cond.setn(true);
|
||||
LOCPLINT->pim->lock();
|
||||
@@ -213,6 +217,7 @@ void CClient::endGame( bool closeConnection /*= true*/ )
|
||||
GH.statusbar = NULL;
|
||||
tlog0 << "Removed GUI." << std::endl;
|
||||
|
||||
|
||||
delete CGI->mh;
|
||||
const_cast<CGameInfo*>(CGI)->mh = NULL;
|
||||
|
||||
@@ -235,9 +240,6 @@ void CClient::endGame( bool closeConnection /*= true*/ )
|
||||
}
|
||||
tlog0 << "Deleted playerInts." << std::endl;
|
||||
|
||||
if(closeConnection)
|
||||
stopConnection();
|
||||
|
||||
tlog0 << "Client stopped." << std::endl;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user