Fix segfault when you press a key before the SSH protocol decides whether
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 21 Nov 2000 10:53:10 +0000 (10:53 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 21 Nov 2000 10:53:10 +0000 (10:53 +0000)
it's doing SSH1 or SSH2. Only visible on slow servers :-)

git-svn-id: svn://svn.tartarus.org/sgt/putty@803 cda61777-01e9-0310-a592-d414129be87e

ssh.c

diff --git a/ssh.c b/ssh.c
index 26379e1..d2eb302 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -2680,7 +2680,7 @@ static char *ssh_init (char *host, int port, char **realhost) {
  * Called to send data down the Telnet connection.
  */
 static void ssh_send (char *buf, int len) {
-    if (s == NULL)
+    if (s == NULL || ssh_protocol == NULL)
        return;
 
     ssh_protocol(buf, len, 0);