mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
Merge pull request #5693 from kdmcser/crash_fix
fix crash when loading game in battle
This commit is contained in:
@@ -191,7 +191,6 @@ void CClient::endGame()
|
||||
removeGUI();
|
||||
|
||||
GAME->setMapInstance(nullptr);
|
||||
gamestate.reset();
|
||||
|
||||
logNetwork->info("Deleted mapHandler and gameState.");
|
||||
|
||||
@@ -200,6 +199,11 @@ void CClient::endGame()
|
||||
battleints.clear();
|
||||
battleCallbacks.clear();
|
||||
playerEnvironments.clear();
|
||||
|
||||
//FIXME: gamestate->currentBattles.clear() will use gamestate. So it shoule be callded before gamestate.reset()
|
||||
gamestate->currentBattles.clear();
|
||||
gamestate.reset();
|
||||
|
||||
logNetwork->info("Deleted playerInts.");
|
||||
logNetwork->info("Client stopped.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user