From a2450d2d07e0b8f16c21cd95872df1f4bf57fbce Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Sun, 4 Aug 2013 11:48:44 -0700 Subject: [PATCH] If a variable can be null, check it before using it. --- src/main/java/com/gmail/nossr50/listeners/PlayerListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index 8b2be4d05..2d90e58a6 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -167,6 +167,10 @@ public class PlayerListener implements Listener { McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); + if (mcMMOPlayer == null) { + return; + } + mcMMOPlayer.checkGodMode(); mcMMOPlayer.checkParty(); }