mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
- NPE prevention in getAllNonPromoCards.
This commit is contained in:
@@ -555,7 +555,13 @@ public final class CardDb implements ICardDatabase, IDeckGenPool {
|
||||
return Lists.newArrayList(Iterables.filter(this.roAllCards, new Predicate<PaperCard>() {
|
||||
@Override
|
||||
public boolean apply(final PaperCard paperCard) {
|
||||
return editions.getEditionByCodeOrThrow(paperCard.getEdition()).getType() != Type.PROMOS;
|
||||
CardEdition edition = null;
|
||||
try {
|
||||
edition = editions.getEditionByCodeOrThrow(paperCard.getEdition());
|
||||
} catch (Exception ex) {
|
||||
return false;
|
||||
}
|
||||
return edition != null && edition.getType() != Type.PROMOS;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user