[Telepathy-commits] [telepathy-gabble/master] gabble_bytestream_socks5_send: check if transport was not set to NULL after writing

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Tue Jan 6 08:41:39 PST 2009


---
 src/bytestream-socks5.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/bytestream-socks5.c b/src/bytestream-socks5.c
index f7f4a18..3e2fdfb 100644
--- a/src/bytestream-socks5.c
+++ b/src/bytestream-socks5.c
@@ -1008,6 +1008,11 @@ gabble_bytestream_socks5_send (GabbleBytestreamIface *iface,
       return FALSE;
     }
 
+  /* If something did wrong during the writting, the transport has been closed
+   * and so set to NULL. */
+  if (priv->transport == NULL)
+    return FALSE;
+
   if (!gibber_transport_buffer_is_empty (priv->transport))
     {
       /* We >don't want to send more data while the buffer isn't empty */
-- 
1.5.6.5




More information about the Telepathy-commits mailing list