Fixed NPE in Riptide Replicator and Volraths Laboratory tokens

This commit is contained in:
Oleg Agafonov 2018-05-02 00:17:55 +04:00
parent 4d31294ee9
commit 3549f958d4
2 changed files with 2 additions and 2 deletions

View file

@ -42,7 +42,7 @@ public class RiptideReplicatorToken extends TokenImpl {
this(null, null, 1); this(null, null, 1);
} }
public RiptideReplicatorToken(ObjectColor color, SubType type, int x) { public RiptideReplicatorToken(ObjectColor color, SubType type, int x) {
super(type.getDescription(), "X/X creature token of the chosen color and type"); super(type != null ? type.getDescription() : "null", "X/X creature token of the chosen color and type");
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
if (color != null) { if (color != null) {
this.color.setColor(color); this.color.setColor(color);

View file

@ -42,7 +42,7 @@ public class VolrathsLaboratoryToken extends TokenImpl {
this(null, null); this(null, null);
} }
public VolrathsLaboratoryToken(ObjectColor color, SubType type) { public VolrathsLaboratoryToken(ObjectColor color, SubType type) {
super(type.getDescription(), "2/2 creature token of the chosen color and type"); super(type != null ? type.getDescription() : "null", "2/2 creature token of the chosen color and type");
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
if (color != null) { if (color != null) {
this.color.setColor(color); this.color.setColor(color);