mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Merge branch 'master' into 'master'
NPE prevention in getAllNonPromoCards. See merge request core-developers/forge!4224
This commit is contained in:
@@ -576,7 +576,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