]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix segfault when you press a key before the SSH protocol decides whether
authorSimon Tatham <anakin@pobox.com>
Tue, 21 Nov 2000 10:53:10 +0000 (10:53 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 21 Nov 2000 10:53:10 +0000 (10:53 +0000)
it's doing SSH1 or SSH2. Only visible on slow servers :-)

[originally from svn r803]

ssh.c

diff --git a/ssh.c b/ssh.c
index 26379e124f7495eb0ad0c313705a5bd26d774d75..d2eb302c88fa73f0a175b74d04af9953ae5dce7e 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);