From 0144fed3c81fc5cb741db9f11fc71e07d340c6d7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 25 Jan 2019 22:42:42 +0100 Subject: fix ats simple plugin crash --- src/ats/plugin_ats2_simple.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ats') diff --git a/src/ats/plugin_ats2_simple.c b/src/ats/plugin_ats2_simple.c index 23907f669..1551420c5 100644 --- a/src/ats/plugin_ats2_simple.c +++ b/src/ats/plugin_ats2_simple.c @@ -755,6 +755,8 @@ update_counters (void *cls, struct GNUNET_ATS_SessionHandle *best[GNUNET_MQ_PREFERENCE_COUNT]; (void) pid; + if (NULL == peer->sh_head) + return GNUNET_YES; /* no available session, cannot allocate bandwidth */ memset (best, 0, sizeof (best)); -- cgit v1.2.3