mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
Fixed several assertion failures on shutting down game
This commit is contained in:
@@ -377,26 +377,18 @@ void CClient::endGame()
|
||||
i.second->finish();
|
||||
|
||||
GH.curInt = nullptr;
|
||||
{
|
||||
boost::unique_lock<boost::recursive_mutex> un(*CPlayerInterface::pim);
|
||||
logNetwork->info("Ending current game!");
|
||||
if(GH.topInt())
|
||||
{
|
||||
GH.topInt()->deactivate();
|
||||
}
|
||||
GH.listInt.clear();
|
||||
GH.objsToBlit.clear();
|
||||
GH.statusbar = nullptr;
|
||||
logNetwork->info("Removed GUI.");
|
||||
|
||||
vstd::clear_pointer(const_cast<CGameInfo *>(CGI)->mh);
|
||||
vstd::clear_pointer(gs);
|
||||
|
||||
logNetwork->info("Deleted mapHandler and gameState.");
|
||||
LOCPLINT = nullptr;
|
||||
}
|
||||
|
||||
playerint.clear();
|
||||
{
|
||||
boost::unique_lock<boost::recursive_mutex> un(*CPlayerInterface::pim);
|
||||
logNetwork->info("Ending current game!");
|
||||
removeGUI();
|
||||
|
||||
vstd::clear_pointer(const_cast<CGameInfo *>(CGI)->mh);
|
||||
vstd::clear_pointer(gs);
|
||||
|
||||
logNetwork->info("Deleted mapHandler and gameState.");
|
||||
}
|
||||
|
||||
playerint.clear();
|
||||
battleints.clear();
|
||||
battleCallbacks.clear();
|
||||
playerEnvironments.clear();
|
||||
|
Reference in New Issue
Block a user