mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Fix double free in battleAfterLevelUp() in case of a draw
This commit is contained in:
parent
2a6a8cd433
commit
7185890723
@ -741,7 +741,7 @@ void CGameHandler::battleAfterLevelUp( const BattleResult &result )
|
|||||||
|
|
||||||
sendAndApply(&sah);
|
sendAndApply(&sah);
|
||||||
}
|
}
|
||||||
if(finishingBattle->winnerHero && finishingBattle->winnerHero->stacks.empty())
|
if(result.winner != 2 && finishingBattle->winnerHero && finishingBattle->winnerHero->stacks.empty())
|
||||||
{
|
{
|
||||||
RemoveObject ro(finishingBattle->winnerHero->id);
|
RemoveObject ro(finishingBattle->winnerHero->id);
|
||||||
sendAndApply(&ro);
|
sendAndApply(&ro);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user