From 27d00c1ba73232c8130fdf135a29d0e2551a0023 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 24 Feb 2017 14:12:03 +0100 Subject: [PATCH] permit NULL head --- src/cadet/gnunet-service-cadet-new_tunnels.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cadet/gnunet-service-cadet-new_tunnels.c b/src/cadet/gnunet-service-cadet-new_tunnels.c index 05a1e071d..9d87f9e03 100644 --- a/src/cadet/gnunet-service-cadet-new_tunnels.c +++ b/src/cadet/gnunet-service-cadet-new_tunnels.c @@ -603,8 +603,11 @@ GCT_count_any_connections (const struct CadetTunnel *t) static struct CadetTConnection * get_ready_connection (struct CadetTunnel *t) { - GNUNET_assert (GNUNET_YES == t->connection_ready_head->is_ready); - return t->connection_ready_head; + struct CadetTConnection *hd = t->connection_ready_head; + + GNUNET_assert ( (NULL == hd) || + (GNUNET_YES == hd->is_ready) ); + return hd; } -- 2.25.1