mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Fix crash on removing town with garrisoned hero from map
This commit is contained in:
@@ -420,8 +420,8 @@ void GameStatePackVisitor::visitRemoveObject(RemoveObject & pack)
|
||||
|
||||
if (town->getGarrisonHero())
|
||||
{
|
||||
town->setGarrisonedHero(nullptr);
|
||||
gs.getMap().showObject(gs.getHero(town->getGarrisonHero()->id));
|
||||
town->setGarrisonedHero(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user