diff options
-rw-r--r-- | java/common/src/main/java/org/apache/qpid/transport/ClientDelegate.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/transport/ClientDelegate.java b/java/common/src/main/java/org/apache/qpid/transport/ClientDelegate.java index 8828d30f52..5e67b822db 100644 --- a/java/common/src/main/java/org/apache/qpid/transport/ClientDelegate.java +++ b/java/common/src/main/java/org/apache/qpid/transport/ClientDelegate.java @@ -178,7 +178,7 @@ public class ClientDelegate extends ConnectionDelegate @Override public void connectionOpenOk(Connection conn, ConnectionOpenOk ok) { SaslClient sc = conn.getSaslClient(); - if (sc.getMechanismName().equals("GSSAPI") && getUserID() != null) + if (sc != null && sc.getMechanismName().equals("GSSAPI") && getUserID() != null) { conn.setUserID(getUserID()); } |