From c32736f3f1e3a95f8af5d6863151d5ea8cec86b8 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Tue, 8 May 2012 12:47:46 -0500 Subject: [PATCH] fix for rare case where faction home location's world being removed or renamed (world with specified name not existing) could lead to NPE --- src/com/massivecraft/factions/Faction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/massivecraft/factions/Faction.java b/src/com/massivecraft/factions/Faction.java index eea70450..2ade2b94 100644 --- a/src/com/massivecraft/factions/Faction.java +++ b/src/com/massivecraft/factions/Faction.java @@ -75,7 +75,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("Your faction home has been un-set since it is no longer in your territory.");