From 7dd09367e1e6e400b56cc3ad18d7d906980cba80 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 29 Oct 2015 10:26:34 +0000 Subject: -do not segv on controller crash --- src/testbed/testbed_api_testbed.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index 5fd59fe61..2fdd2356a 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c @@ -624,12 +624,14 @@ interrupt (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) rc->interrupt_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &interrupt, rc); rc_cleanup_operations (rc); - if ( (GNUNET_NO == rc->shutdown) - && (NULL != c) - && (0 != (size = GNUNET_CONTAINER_multihashmap32_size (c->opc_map)))) + if ( (GNUNET_NO == rc->shutdown) && + (NULL != c) && + (NULL != c->opc_map) && + (0 != (size = GNUNET_CONTAINER_multihashmap32_size (c->opc_map)))) { - LOG (GNUNET_ERROR_TYPE_WARNING, "Shutdown postponed as there are " - "%u operations currently active\n", size); + LOG (GNUNET_ERROR_TYPE_WARNING, + "Shutdown postponed as there are %u operations currently active\n", + size); c->opcq_empty_cb = &wait_op_completion; c->opcq_empty_cls = rc; return; -- cgit v1.2.3