From 734f4aaaeb4613414ddf00d0f86335d0a262c67a Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Fri, 3 Sep 2010 15:32:01 +0000 Subject: [PATCH] handle null continuation --- src/core/core_api_peer_request.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/core/core_api_peer_request.c b/src/core/core_api_peer_request.c index fa5764af6..2578e6452 100644 --- a/src/core/core_api_peer_request.c +++ b/src/core/core_api_peer_request.c @@ -106,10 +106,13 @@ send_request (void *cls, msg.timeout = GNUNET_TIME_relative_hton (GNUNET_TIME_absolute_get_remaining (prh->timeout)); msg.peer = prh->peer; memcpy (buf, &msg, sizeof (msg)); - GNUNET_SCHEDULER_add_continuation (prh->sched, - prh->cont, - prh->cont_cls, - GNUNET_SCHEDULER_REASON_PREREQ_DONE); + if (prh->cont != NULL) + { + GNUNET_SCHEDULER_add_continuation (prh->sched, + prh->cont, + prh->cont_cls, + GNUNET_SCHEDULER_REASON_PREREQ_DONE); + } GNUNET_CLIENT_disconnect (prh->client, GNUNET_YES); GNUNET_free (prh); return sizeof (msg); -- 2.25.1