From ba16a202ba211e09f4c0bb1d54c8af0879e1a503 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Tue, 8 May 2012 14:25:18 -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 62e44ead..a983ff89 100644 --- a/src/com/massivecraft/factions/Faction.java +++ b/src/com/massivecraft/factions/Faction.java @@ -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("Your faction home has been un-set since it is no longer in your territory.");