UserInfo NPE precaution.

This commit is contained in:
MobiusDevelopment 2019-11-07 16:24:42 +00:00
parent 38d932ec9d
commit 0b6b46d213
2 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
return false;
}
final boolean isProtocol235 = _player.getClient().getProtocolVersion() == 235;
final boolean isProtocol235 = (_player.getClient() != null) && (_player.getClient().getProtocolVersion() == 235);
OutgoingPackets.USER_INFO.writeId(packet);

View File

@ -136,7 +136,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
return false;
}
final boolean isProtocol235 = _player.getClient().getProtocolVersion() == 235;
final boolean isProtocol235 = (_player.getClient() != null) && (_player.getClient().getProtocolVersion() == 235);
OutgoingPackets.USER_INFO.writeId(packet);