From bfc70f045a8e34de985f7e8bcbcc2fca52e404e9 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 26 Jan 2012 22:50:42 +0000 Subject: [PATCH] -allow NULL --- src/util/helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util/helper.c b/src/util/helper.c index c7e059237..029203638 100644 --- a/src/util/helper.c +++ b/src/util/helper.c @@ -189,7 +189,8 @@ stop_helper (struct GNUNET_HELPER_Handle *h) GNUNET_CONTAINER_DLL_remove (h->mq_head, h->mq_tail, qe); - qe->cont (qe->cont_cls, GNUNET_NO); + if (NULL != qe->cont) + qe->cont (qe->cont_cls, GNUNET_NO); GNUNET_free (qe); } /* purge MST buffer */ @@ -387,7 +388,8 @@ GNUNET_HELPER_stop (struct GNUNET_HELPER_Handle *h) GNUNET_CONTAINER_DLL_remove (h->mq_head, h->mq_tail, qe); - qe->cont (qe->cont_cls, GNUNET_SYSERR); + if (NULL != qe->cont) + qe->cont (qe->cont_cls, GNUNET_SYSERR); GNUNET_free (qe); } stop_helper (h); -- 2.25.1