* Fixed possible null pointer exception for add land dialog.

This commit is contained in:
LevelX2 2014-12-29 15:05:01 +01:00
parent e19c8cb641
commit dda73f304e

View file

@ -66,7 +66,7 @@ public class AddLandDialog extends MageDialog {
// decide from which sets basic lands are taken from // decide from which sets basic lands are taken from
for (String setCode :deck.getExpansionSetCodes()) { for (String setCode :deck.getExpansionSetCodes()) {
ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode); ExpansionInfo expansionInfo = ExpansionRepository.instance.getSetByCode(setCode);
if (expansionInfo.hasBasicLands()) { if (expansionInfo != null && expansionInfo.hasBasicLands()) {
this.setCodesland.add(expansionInfo.getCode()); this.setCodesland.add(expansionInfo.getCode());
} }
} }