- fix error messages
[oweals/gnunet.git] / src / transport / plugin_transport_tcp.c
index 2ffec78430d7ca7ae34045e349f4436ab60d3ccb..a969bdd2271502dcf61e02daae7b090077b1085a 100644 (file)
@@ -806,8 +806,9 @@ tcp_disconnect_session (void *cls,
                                                          &session->target,
                                                          session));
   }
-  GNUNET_SERVER_client_set_user_context (session->client,
-                                         (void *) NULL);
+  if (NULL != session->client)
+    GNUNET_SERVER_client_set_user_context (session->client,
+                                           (void *) NULL);
 
   /* clean up state */
   if (NULL != session->transmit_handle)