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:
parent
99992599db
commit
2a6a8cd433
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user