fix for rare case where faction home location's world being removed or renamed (world with specified name not existing) could lead to NPE

This commit is contained in:
Brettflan 2012-05-08 14:25:18 -05:00
parent 66a7685bf7
commit ba16a202ba
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ public class Faction extends Entity implements EconomyParticipator
}
public void confirmValidHome()
{
if (!Conf.homesMustBeInClaimedTerritory || this.home == null || Board.getFactionAt(new FLocation(this.home.getLocation())) == this)
if (!Conf.homesMustBeInClaimedTerritory || this.home == null || (this.home.getLocation() != null && Board.getFactionAt(new FLocation(this.home.getLocation())) == this))
return;
msg("<b>Your faction home has been un-set since it is no longer in your territory.");