diff --git a/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java b/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java index 873958204..d15c5ea77 100644 --- a/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java +++ b/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java @@ -225,7 +225,9 @@ protected void gotExtendedData(SSHPacket buf) @Override public void notifyError(SSHException error) { - err.notifyError(error); + if (err != null) { + err.notifyError(error); + } super.notifyError(error); }