mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Fix crash
This commit is contained in:
parent
e38b822303
commit
53b9434a22
@ -443,14 +443,15 @@ void CPlayerInterface::heroKilled(const CGHeroInstance* hero)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wanderingHeroes -= hero;
|
wanderingHeroes -= hero;
|
||||||
if (vstd::contains(paths, hero))
|
|
||||||
paths.erase(hero);
|
|
||||||
|
|
||||||
adventureInt->heroList.update(hero);
|
adventureInt->heroList.update(hero);
|
||||||
if (makingTurn && newSelection)
|
if (makingTurn && newSelection)
|
||||||
adventureInt->select(newSelection, true);
|
adventureInt->select(newSelection, true);
|
||||||
else if (adventureInt->selection == hero)
|
else if (adventureInt->selection == hero)
|
||||||
adventureInt->selection = nullptr;
|
adventureInt->selection = nullptr;
|
||||||
|
|
||||||
|
if (vstd::contains(paths, hero))
|
||||||
|
paths.erase(hero);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayerInterface::heroVisit(const CGHeroInstance * visitor, const CGObjectInstance * visitedObj, bool start)
|
void CPlayerInterface::heroVisit(const CGHeroInstance * visitor, const CGObjectInstance * visitedObj, bool start)
|
||||||
|
Loading…
Reference in New Issue
Block a user