mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-21 17:17:06 +02:00
fix crash: defender is killed by spell before attack, but attacker still do attack action
This commit is contained in:
parent
7be44278d7
commit
7cb8ca174e
@ -916,6 +916,10 @@ void BattleActionProcessor::makeAttack(const CBattleInfoCallback & battle, const
|
||||
if(defender && first && !counter)
|
||||
handleAttackBeforeCasting(battle, ranged, attacker, defender);
|
||||
|
||||
// If the attacker or defender is not alive before the attack action, the action should be skipped.
|
||||
if((attacker && !attacker->alive()) || (defender && !defender->alive()))
|
||||
return;
|
||||
|
||||
FireShieldInfo fireShield;
|
||||
BattleAttack bat;
|
||||
BattleLogMessage blm;
|
||||
|
Loading…
Reference in New Issue
Block a user