From b7e754d8d9726a057d38a2dbbd7cbd10e2ddbae6 Mon Sep 17 00:00:00 2001 From: BetaSteward Date: Sat, 11 Jun 2011 23:11:48 -0400 Subject: [PATCH] fixed NPE when amount is null --- .../dynamicvalue/common/PermanentsOnBattlefieldCount.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mage/src/mage/abilities/dynamicvalue/common/PermanentsOnBattlefieldCount.java b/Mage/src/mage/abilities/dynamicvalue/common/PermanentsOnBattlefieldCount.java index 63d9beaec7..04597aff3e 100644 --- a/Mage/src/mage/abilities/dynamicvalue/common/PermanentsOnBattlefieldCount.java +++ b/Mage/src/mage/abilities/dynamicvalue/common/PermanentsOnBattlefieldCount.java @@ -44,7 +44,9 @@ public class PermanentsOnBattlefieldCount implements DynamicValue { @Override public String toString() { - return amount.toString(); + if (amount != null) + return amount.toString(); + return ""; } @Override