From 3549f958d427f733dc37dbfed6a65c856dfeb970 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Wed, 2 May 2018 00:17:55 +0400 Subject: [PATCH] Fixed NPE in Riptide Replicator and Volraths Laboratory tokens --- .../java/mage/game/permanent/token/RiptideReplicatorToken.java | 2 +- .../java/mage/game/permanent/token/VolrathsLaboratoryToken.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage/src/main/java/mage/game/permanent/token/RiptideReplicatorToken.java b/Mage/src/main/java/mage/game/permanent/token/RiptideReplicatorToken.java index 3cbad8b40b..0fb51cb4cd 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RiptideReplicatorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RiptideReplicatorToken.java @@ -42,7 +42,7 @@ public class RiptideReplicatorToken extends TokenImpl { this(null, null, 1); } 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); if (color != null) { this.color.setColor(color); diff --git a/Mage/src/main/java/mage/game/permanent/token/VolrathsLaboratoryToken.java b/Mage/src/main/java/mage/game/permanent/token/VolrathsLaboratoryToken.java index 063bfceef6..59c6ec5fc4 100644 --- a/Mage/src/main/java/mage/game/permanent/token/VolrathsLaboratoryToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/VolrathsLaboratoryToken.java @@ -42,7 +42,7 @@ public class VolrathsLaboratoryToken extends TokenImpl { this(null, null); } 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); if (color != null) { this.color.setColor(color);