From 0d12f566e51062b75856c072734c388ab4883c2b Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 3 Sep 2020 18:39:05 -0400 Subject: [PATCH] fixed an NPE issue --- .../org/mage/test/serverside/base/MageTestPlayerBase.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/base/MageTestPlayerBase.java b/Mage.Tests/src/test/java/org/mage/test/serverside/base/MageTestPlayerBase.java index 694498f91c..55ddf6c13d 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/base/MageTestPlayerBase.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/base/MageTestPlayerBase.java @@ -440,7 +440,9 @@ class CustomTestCard extends CardImpl { } static void addAdditionalSubtypes(String cardName, SubType... subtypes) { - subTypesList.computeIfAbsent(cardName, s -> new HashSet<>()).addAll(Arrays.asList(subtypes.clone())); + if(subtypes!=null) { + subTypesList.computeIfAbsent(cardName, s -> new HashSet<>()).addAll(Arrays.asList(subtypes.clone())); + } } static void clearAdditionalSubtypes(String cardName) {