Fix NPE when no Callback is defined FIXES #772

This commit is contained in:
Keir Nellyer 2013-12-21 12:14:42 +00:00
parent 075518b643
commit 608eaace1c

View File

@ -225,8 +225,11 @@ public final class UserConnection implements ProxiedPlayer
{ {
@Override @Override
public void operationComplete(ChannelFuture future) throws Exception public void operationComplete(ChannelFuture future) throws Exception
{
if ( callback != null )
{ {
callback.done( future.isSuccess(), future.cause() ); callback.done( future.isSuccess(), future.cause() );
}
if ( !future.isSuccess() ) if ( !future.isSuccess() )
{ {