FIX cardDb bug for lazy card loading when issuing a request with a non-existing set code.

Code FIX + Test
This commit is contained in:
leriomaggio
2021-08-28 17:54:53 +01:00
parent b1c50599e9
commit a7d1e7398a
2 changed files with 27 additions and 0 deletions

View File

@@ -249,6 +249,8 @@ public final class CardDb implements ICardDatabase, IDeckGenPool {
}
} else {
CardEdition e = editions.get(setCode);
if (e == null)
return; // wrong set code - nothing we can do here!
List<CardInSet> cardsInSet = e.getCardInSet(cardName); // empty collection if not present
for (CardInSet cis : cardsInSet) {
addSetCard(e, cis, cr);