* Fixed a possible null pointer exception concerning Aura enchantments without targets log message.

This commit is contained in:
LevelX2 2015-02-12 13:52:34 +01:00
parent 38f9bb90b2
commit 3142866ede

View file

@ -1520,7 +1520,7 @@ public abstract class GameImpl implements Game, Serializable {
else {
if (perm.getSpellAbility().getTargets().isEmpty()) {
Permanent enchanted = this.getPermanent(perm.getAttachedTo());
logger.error("Aura without target: " + perm.getName() + " attached to " + enchanted == null ? " null" : enchanted.getName());
logger.error("Aura without target: " + perm.getName() + " attached to " + (enchanted == null ? " null" : enchanted.getName()));
} else {
Target target = perm.getSpellAbility().getTargets().get(0);
if (target instanceof TargetPermanent) {