mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fixed card rendering breaking when view is missing set code. Real issue is #2260, but that will take more work to fix.
This commit is contained in:
parent
628b1a6573
commit
610c4789e5
1 changed files with 13 additions and 1 deletions
|
@ -63,7 +63,19 @@ public class CardPanelRenderImpl extends CardPanel {
|
|||
if (!a.getRules().equals(b.getRules())) {
|
||||
return false;
|
||||
}
|
||||
if (!a.getExpansionSetCode().equals(b.getExpansionSetCode())) {
|
||||
|
||||
// Expansion set code, with null checking:
|
||||
// TODO: The null checks should not be necessary, but thanks to Issue #2260
|
||||
// some tokens / commandobjects will be missing expansion set codes.
|
||||
String expA = a.getExpansionSetCode();
|
||||
if (expA == null) {
|
||||
expA = "";
|
||||
}
|
||||
String expB = b.getExpansionSetCode();
|
||||
if (expB == null) {
|
||||
expB = "";
|
||||
}
|
||||
if (!expA.equals(expB)) {
|
||||
return false;
|
||||
}
|
||||
if (a.getFrameStyle() != b.getFrameStyle()) {
|
||||
|
|
Loading…
Reference in a new issue