ssh->mainchan can be NULL; try not to segfault in that situation.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 3 Sep 2007 19:09:56 +0000 (19:09 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 3 Sep 2007 19:09:56 +0000 (19:09 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@7705 cda61777-01e9-0310-a592-d414129be87e

ssh.c

diff --git a/ssh.c b/ssh.c
index f78ffbe..a2aeb54 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -9082,8 +9082,9 @@ static void ssh_unthrottle(void *handle, int bufsize)
            ssh1_throttle(ssh, -1);
        }
     } else {
-       ssh2_set_window(ssh->mainchan,
-                       ssh->mainchan->v.v2.locmaxwin - bufsize);
+       if (ssh->mainchan)
+           ssh2_set_window(ssh->mainchan,
+                           ssh->mainchan->v.v2.locmaxwin - bufsize);
     }
 }