mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- NPE guard.
This commit is contained in:
@@ -524,8 +524,11 @@ public class CardDetailUtil {
|
|||||||
if (!card.getName().isEmpty()) {
|
if (!card.getName().isEmpty()) {
|
||||||
origPaperCard = FModel.getMagicDb().getCommonCards().getCard(card.getName());
|
origPaperCard = FModel.getMagicDb().getCommonCards().getCard(card.getName());
|
||||||
} else {
|
} else {
|
||||||
// probably a morph, try to get its identity from the alternate state
|
// probably a morph or manifest, try to get its identity from the alternate state
|
||||||
origPaperCard = FModel.getMagicDb().getCommonCards().getCard(card.getAlternateState().getName());
|
String altName = card.getAlternateState().getName();
|
||||||
|
if (!altName.isEmpty()) {
|
||||||
|
origPaperCard = FModel.getMagicDb().getCommonCards().getCard(card.getAlternateState().getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (origPaperCard != null) {
|
if (origPaperCard != null) {
|
||||||
origCard = Card.getCardForUi(origPaperCard); // if null, probably a variant card
|
origCard = Card.getCardForUi(origPaperCard); // if null, probably a variant card
|
||||||
|
|||||||
Reference in New Issue
Block a user