mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
* Fixed possible null pointer exception for add land dialog.
This commit is contained in:
parent
dda73f304e
commit
64176c1fa6
1 changed files with 6 additions and 4 deletions
|
@ -75,10 +75,12 @@ public class AddLandDialog extends MageDialog {
|
||||||
if (this.setCodesland.isEmpty()) {
|
if (this.setCodesland.isEmpty()) {
|
||||||
for (String setCode :deck.getExpansionSetCodes()) {
|
for (String setCode :deck.getExpansionSetCodes()) {
|
||||||
ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode);
|
ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode);
|
||||||
ExpansionInfo [] blockSets = ExpansionRepository.instance.getSetsFromBlock(expansionInfo.getBlockName());
|
if (expansionInfo != null) {
|
||||||
for (ExpansionInfo blockSet: blockSets) {
|
ExpansionInfo [] blockSets = ExpansionRepository.instance.getSetsFromBlock(expansionInfo.getBlockName());
|
||||||
if (blockSet.hasBasicLands()) {
|
for (ExpansionInfo blockSet: blockSets) {
|
||||||
this.setCodesland.add(blockSet.getCode());
|
if (blockSet.hasBasicLands()) {
|
||||||
|
this.setCodesland.add(blockSet.getCode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue