1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Fix segfault when non-hero forces win

This commit is contained in:
Vadim Markovtsev 2016-01-23 19:42:56 +03:00
parent 99992599db
commit 2a6a8cd433

View File

@ -741,7 +741,7 @@ void CGameHandler::battleAfterLevelUp( const BattleResult &result )
sendAndApply(&sah);
}
if(finishingBattle->winnerHero->stacks.empty())
if(finishingBattle->winnerHero && finishingBattle->winnerHero->stacks.empty())
{
RemoveObject ro(finishingBattle->winnerHero->id);
sendAndApply(&ro);