diff --git a/src/engine/net/client/handlers/GameServerIPRequestMsgHandler.java b/src/engine/net/client/handlers/GameServerIPRequestMsgHandler.java index 5d16b81d..6ddf1fd2 100644 --- a/src/engine/net/client/handlers/GameServerIPRequestMsgHandler.java +++ b/src/engine/net/client/handlers/GameServerIPRequestMsgHandler.java @@ -32,7 +32,6 @@ public class GameServerIPRequestMsgHandler extends AbstractClientMsgHandler { @Override protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) throws MsgSendException { - PlayerCharacter playerCharacter = origin.getPlayerCharacter(); Session session = SessionManager.getSession(origin); // Member variable declaration @@ -43,6 +42,8 @@ public class GameServerIPRequestMsgHandler extends AbstractClientMsgHandler { msg = (GameServerIPRequestMsg) baseMsg; + PlayerCharacter playerCharacter = PlayerCharacter.getPlayerCharacter(msg.getCharacterUUID()); + if (playerCharacter == null) { Logger.info("Unable to find character ID " + msg.getCharacterUUID()); LoginServer.KickToLogin(MBServerStatics.LOGINERROR_UNABLE_TO_LOGIN, "PlayerCharacter lookup failed in .RequestGameServer().", origin);