mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Merge branch 'custom-crash' into 'master'
Prevent crash in custom card loading See merge request core-developers/forge!4236
This commit is contained in:
@@ -185,7 +185,10 @@ public class StaticData {
|
|||||||
CardDb.CardRequest r = CardRequest.fromString(encodedCardName);
|
CardDb.CardRequest r = CardRequest.fromString(encodedCardName);
|
||||||
String cardName = r.cardName;
|
String cardName = r.cardName;
|
||||||
CardRules rules = cardReader.attemptToLoadCard(cardName, setCode);
|
CardRules rules = cardReader.attemptToLoadCard(cardName, setCode);
|
||||||
CardRules customRules = customCardReader.attemptToLoadCard(cardName, setCode);
|
CardRules customRules = null;
|
||||||
|
if (customCardReader != null) {
|
||||||
|
customRules = customCardReader.attemptToLoadCard(cardName, setCode);
|
||||||
|
}
|
||||||
if (rules != null) {
|
if (rules != null) {
|
||||||
if (rules.isVariant()) {
|
if (rules.isVariant()) {
|
||||||
variantCards.loadCard(cardName, rules);
|
variantCards.loadCard(cardName, rules);
|
||||||
|
|||||||
Reference in New Issue
Block a user