fixed an NPE issue

This commit is contained in:
Evan Kranzler 2020-09-03 18:39:05 -04:00
parent 003fd098b0
commit 0d12f566e5

View file

@ -440,8 +440,10 @@ class CustomTestCard extends CardImpl {
} }
static void addAdditionalSubtypes(String cardName, SubType... subtypes) { static void addAdditionalSubtypes(String cardName, SubType... subtypes) {
if(subtypes!=null) {
subTypesList.computeIfAbsent(cardName, s -> new HashSet<>()).addAll(Arrays.asList(subtypes.clone())); subTypesList.computeIfAbsent(cardName, s -> new HashSet<>()).addAll(Arrays.asList(subtypes.clone()));
} }
}
static void clearAdditionalSubtypes(String cardName) { static void clearAdditionalSubtypes(String cardName) {
subTypesList.remove(cardName); subTypesList.remove(cardName);