1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-14 17:48:05 -05:00

ssh->mainchan can be NULL; try not to segfault in that situation.

[originally from svn r7705]
This commit is contained in:
Simon Tatham 2007-09-03 19:09:56 +00:00
parent be8818b4bc
commit 4b178be3e9

5
ssh.c
View File

@ -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);
}
}