Fixed probable hardware info holder NPE.

This commit is contained in:
MobiusDevelopment
2021-08-07 00:35:27 +00:00
parent d5387bb853
commit a261be39a8
23 changed files with 138 additions and 46 deletions

View File

@ -733,9 +733,13 @@ public class EnterWorld implements IClientIncomingPacket
int count = 0;
for (PlayerInstance plr : World.getInstance().getPlayers())
{
if ((plr.isOnlineInt() == 1) && (plr.getClient().getHardwareInfo().equals(hwInfo)))
if (plr.isOnlineInt() == 1)
{
count++;
final ClientHardwareInfoHolder hwi = plr.getClient().getHardwareInfo();
if ((hwi != null) && hwi.equals(hwInfo))
{
count++;
}
}
}
if (count >= Config.MAX_PLAYERS_PER_HWID)