mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Prevent a potential NPE
This commit is contained in:
@@ -659,7 +659,7 @@ public class PlayerControllerAi extends PlayerController {
|
||||
}
|
||||
}
|
||||
final PhaseHandler ph = game.getPhaseHandler();
|
||||
if (ph.getPlayerTurn() == sa.getActivatingPlayer() && ph.getPhase() == PhaseType.MAIN1) {
|
||||
if (ph.getPlayerTurn() == sa.getActivatingPlayer() && ph.getPhase() == PhaseType.MAIN1 && sa.getTargetCard() != null) {
|
||||
AiAttackController aiAtk = new AiAttackController(sa.getActivatingPlayer(), sa.getTargetCard());
|
||||
String s = aiAtk.toProtectAttacker(sa);
|
||||
if (s != null) {
|
||||
|
||||
Reference in New Issue
Block a user