Continue but log NullPointerException in getMana

Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
This commit is contained in:
Jamin W. Collins
2018-02-15 17:08:01 -07:00
parent b47d528bf0
commit 84874601a9

View File

@@ -373,7 +373,14 @@ public class PlayerView extends GameEntityView {
}
public int getMana(final byte color) {
Integer count = getMana().get(color);
Integer count = null;
try {
count = getMana().get(color);
}
catch (Exception e) {
e.printStackTrace();
count = null;
}
return count != null ? count.intValue() : 0;
}
private Map<Byte, Integer> getMana() {