ComputerPlayer2 NullPointerException fix.

This commit is contained in:
magenoxx 2011-02-28 00:30:14 +03:00
parent 080e2c6238
commit 422be868ff

View file

@ -646,7 +646,7 @@ public class ComputerPlayer2 extends ComputerPlayer<ComputerPlayer2> implements
@Override @Override
public void selectAttackers(Game game) { public void selectAttackers(Game game) {
if (logger.isDebugEnabled() && combat == null || combat.getGroups().isEmpty()) if (logger.isDebugEnabled() && (combat == null || combat.getGroups().isEmpty()))
logger.debug("not attacking"); logger.debug("not attacking");
if (combat != null) { if (combat != null) {
UUID opponentId = game.getCombat().getDefenders().iterator().next(); UUID opponentId = game.getCombat().getDefenders().iterator().next();