Fix crash

This commit is contained in:
nordsoft
2022-07-29 11:08:38 +03:00
committed by Andrii Danylchenko
parent e38b822303
commit 53b9434a22
+3 -2
View File
@@ -443,14 +443,15 @@ void CPlayerInterface::heroKilled(const CGHeroInstance* hero)
}
wanderingHeroes -= hero;
if (vstd::contains(paths, hero))
paths.erase(hero);
adventureInt->heroList.update(hero);
if (makingTurn && newSelection)
adventureInt->select(newSelection, true);
else if (adventureInt->selection == hero)
adventureInt->selection = nullptr;
if (vstd::contains(paths, hero))
paths.erase(hero);
}
void CPlayerInterface::heroVisit(const CGHeroInstance * visitor, const CGObjectInstance * visitedObj, bool start)