fix #8115 segmentation fault on attack event (berserker) (#8116)

This commit is contained in:
gfgtdf 2023-12-15 21:08:16 +01:00
parent 305c632a35
commit eb09f5a766

View file

@ -1226,9 +1226,11 @@ bool attack::perform_hit(bool attacker_turn, statistics::attack_context& stats)
// for that unit, but let the other unit continue
if (attacker_stats->weapon == nullptr){
attacker.n_attacks_ = 0;
attacker.orig_attacks_ = 0;
}
if (defender_stats->weapon == nullptr){
defender.n_attacks_ = 0;
defender.orig_attacks_ = 0;
}
return true;