From 3af6f2737a484115193c40b61b13d148566a4f40 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Thu, 1 Mar 2012 09:38:47 -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 a1714473..5444b8e8 100644 --- a/src/com/massivecraft/factions/integration/SpoutFeatures.java +++ b/src/com/massivecraft/factions/integration/SpoutFeatures.java @@ -195,6 +195,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)