From: Nathan S. Evans Date: Fri, 3 Sep 2010 15:32:01 +0000 (+0000) Subject: handle null continuation X-Git-Tag: initial-import-from-subversion-38251~20466 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=734f4aaaeb4613414ddf00d0f86335d0a262c67a;p=oweals%2Fgnunet.git handle null continuation --- 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);