From 4b178be3e9608120fe68a62999b8c678ef860e97 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 3 Sep 2007 19:09:56 +0000 Subject: [PATCH] ssh->mainchan can be NULL; try not to segfault in that situation. [originally from svn r7705] --- ssh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ssh.c b/ssh.c index f78ffbef..a2aeb541 100644 --- 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); } }