[libgssh] channel: Add a precondition that we have a connection



commit f412da943084e199856eab5743d8a0e0b59e41ee
Author: Colin Walters <walters verbum org>
Date:   Thu Feb 27 08:17:01 2014 -0500

    channel: Add a precondition that we have a connection
    
    Was hitting this with hotssh.

 src/gssh-channel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/gssh-channel.c b/src/gssh-channel.c
index e631f36..7342421 100644
--- a/src/gssh-channel.c
+++ b/src/gssh-channel.c
@@ -130,6 +130,7 @@ gssh_channel_request_pty_size_async (GSshChannel         *self,
 {
   g_return_if_fail (self->have_pty);
   g_return_if_fail (self->pty_size_task == NULL);
+  g_return_if_fail (self->connection != NULL);
   g_return_if_fail (self->connection->state == GSSH_CONNECTION_STATE_CONNECTED);
 
   self->pty_size_task = g_task_new (self, cancellable, callback, user_data);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]