* Fixed possible null pointer exception for add land dialog.

This commit is contained in:
LevelX2 2014-12-29 15:06:56 +01:00
parent dda73f304e
commit 64176c1fa6

View file

@ -75,10 +75,12 @@ public class AddLandDialog extends MageDialog {
if (this.setCodesland.isEmpty()) {
for (String setCode :deck.getExpansionSetCodes()) {
ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode);
ExpansionInfo [] blockSets = ExpansionRepository.instance.getSetsFromBlock(expansionInfo.getBlockName());
for (ExpansionInfo blockSet: blockSets) {
if (blockSet.hasBasicLands()) {
this.setCodesland.add(blockSet.getCode());
if (expansionInfo != null) {
ExpansionInfo [] blockSets = ExpansionRepository.instance.getSetsFromBlock(expansionInfo.getBlockName());
for (ExpansionInfo blockSet: blockSets) {
if (blockSet.hasBasicLands()) {
this.setCodesland.add(blockSet.getCode());
}
}
}
}