Fix for rare SpoutPlayer exception when player logs off while spout features related to them are updating

This commit is contained in:
Brettflan 2011-12-16 00:29:53 -06:00
parent 86f80f0421
commit 22fe84f32c

View File

@ -219,11 +219,12 @@ public class SpoutFeatures
if (viewedFaction == null) if (viewedFaction == null)
return; return;
SpoutPlayer sPlayer = SpoutManager.getPlayer(viewer.getPlayer());
Player pViewed = viewed.getPlayer(); Player pViewed = viewed.getPlayer();
if (pViewed == null || viewer.getPlayer() == null) Player pViewer = viewer.getPlayer();
if (pViewed == null || pViewer == null)
return; return;
SpoutPlayer sPlayer = SpoutManager.getPlayer(pViewer);
String viewedTitle = viewed.getTitle(); String viewedTitle = viewed.getTitle();
Role viewedRole = viewed.getRole(); Role viewedRole = viewed.getRole();