Castle NPE check for isAutoAttackable first mid victory.

This commit is contained in:
MobiusDevelopment
2022-02-12 07:55:57 +00:00
parent 5838543afb
commit 5d43fcd6b4
23 changed files with 49 additions and 24 deletions

View File

@@ -8162,7 +8162,8 @@ public class Player extends Playable
if (siege.checkIsAttacker(attackerClan) && siege.checkIsAttacker(clan))
{
// If first mid victory is achieved, attackers can attack attackers.
return CastleManager.getInstance().getCastleById(_siegeSide).isFirstMidVictory();
final Castle castle = CastleManager.getInstance().getCastleById(_siegeSide);
return (castle != null) && castle.isFirstMidVictory();
}
}