From 608eaace1c5c7793f64a6c81355b01566ba2bd55 Mon Sep 17 00:00:00 2001 From: Keir Nellyer Date: Sat, 21 Dec 2013 12:14:42 +0000 Subject: [PATCH] Fix NPE when no Callback is defined FIXES #772 --- proxy/src/main/java/net/md_5/bungee/UserConnection.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java index 4ee7fcc2..3b1fccdb 100644 --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java @@ -226,7 +226,10 @@ public final class UserConnection implements ProxiedPlayer @Override public void operationComplete(ChannelFuture future) throws Exception { - callback.done( future.isSuccess(), future.cause() ); + if ( callback != null ) + { + callback.done( future.isSuccess(), future.cause() ); + } if ( !future.isSuccess() ) {