Final attempt to fix rare non-fatal NPE from Player ending up returning null while updating Spout appearance features

This commit is contained in:
Brettflan 2012-03-01 09:38:46 -06:00
parent a4ee13ebbe
commit e1a3d8bffb

View File

@ -220,6 +220,10 @@ public class SpoutFeatures
if (viewedFaction == null) if (viewedFaction == null)
return; 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 pViewer = SpoutManager.getPlayer(viewer.getPlayer());
SpoutPlayer pViewed = SpoutManager.getPlayer(viewed.getPlayer()); SpoutPlayer pViewed = SpoutManager.getPlayer(viewed.getPlayer());
if (pViewed == null || pViewer == null) if (pViewed == null || pViewer == null)