From e1a3d8bffb5f00f7a234764bdaa627b382aa9ac9 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Thu, 1 Mar 2012 09:38:46 -0600 Subject: [PATCH] Final attempt to fix rare non-fatal NPE from Player ending up returning null while updating Spout appearance features --- src/com/massivecraft/factions/integration/SpoutFeatures.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/massivecraft/factions/integration/SpoutFeatures.java b/src/com/massivecraft/factions/integration/SpoutFeatures.java index cc0954bf..595ecc01 100644 --- a/src/com/massivecraft/factions/integration/SpoutFeatures.java +++ b/src/com/massivecraft/factions/integration/SpoutFeatures.java @@ -220,6 +220,10 @@ public class SpoutFeatures if (viewedFaction == null) return; + // these still end up returning null on occasion at this point, mucking up the SpoutManager.getPlayer() method + if (viewer.getPlayer() == null || viewed.getPlayer() == null) + return; + SpoutPlayer pViewer = SpoutManager.getPlayer(viewer.getPlayer()); SpoutPlayer pViewed = SpoutManager.getPlayer(viewed.getPlayer()); if (pViewed == null || pViewer == null)