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:
parent
66a7685bf7
commit
ba16a202ba
@ -108,7 +108,7 @@ public class Faction extends Entity implements EconomyParticipator
|
|||||||
}
|
}
|
||||||
public void confirmValidHome()
|
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;
|
return;
|
||||||
|
|
||||||
msg("<b>Your faction home has been un-set since it is no longer in your territory.");
|
msg("<b>Your faction home has been un-set since it is no longer in your territory.");
|
||||||
|
Loading…
Reference in New Issue
Block a user