From 7376708ac7b99e80fb28e47b4acb305ef8069d3c Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 17 Sep 2012 11:56:04 +0000 Subject: [PATCH] - do not crash on shutdown --- src/transport/transport_api.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index c905a1549..2d4890db9 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c @@ -988,7 +988,12 @@ GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle, const struct GNUNET_PeerIdentity *target) { struct GNUNET_PeerIdentity *pid; - GNUNET_assert (NULL != handle->client); + if (NULL == handle->client) + { + /* FIXME: handle->client can be NULL when transport api is reconnecting */ + GNUNET_break (0); + return; + } pid = GNUNET_malloc (sizeof (struct GNUNET_PeerIdentity)); *pid = *target; -- 2.25.1