summaryrefslogtreecommitdiffstats
path: root/src/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/channels.c')
-rw-r--r--src/channels.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/channels.c b/src/channels.c
index 6b7abb61..871e1401 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -1495,11 +1495,16 @@ error:
*/
int ssh_channel_request_pty_size(ssh_channel channel, const char *terminal,
int col, int row) {
- ssh_session session = channel->session;
+ ssh_session session;
ssh_string term = NULL;
ssh_buffer buffer = NULL;
int rc = SSH_ERROR;
+ if (channel == NULL) {
+ return SSH_ERROR;
+ }
+ session = channel->session;
+
enter_function();
#ifdef WITH_SSH1
if (channel->version==1) {