mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-21 09:02:07 -07:00
Fix non-fatal NPE in networking code
This commit is contained in:
parent
d4359ccc60
commit
5a6657e243
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ public class IoEventHandler {
|
|||
ByteBuffer buffer = ByteBuffer.allocate(100_000);
|
||||
IoSession session = (IoSession) key.attachment();
|
||||
if (channel.read(buffer) == -1) {
|
||||
if(session.getPlayer() != null){
|
||||
if(session != null && session.getPlayer() != null){
|
||||
Repository.getDisconnectionQueue().add(session.getPlayer());
|
||||
}
|
||||
key.cancel();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue