From: Julius Bünger Date: Mon, 10 Dec 2018 16:58:57 +0000 (+0100) Subject: RPS service: Assure map with exists before using X-Git-Tag: v0.11.0~164 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=37f806bedb12e20a6ccdd87df7fa28d4b4ad041e;p=oweals%2Fgnunet.git RPS service: Assure map with exists before using --- diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 10ab1c10a..0c333c4f1 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c @@ -3499,7 +3499,8 @@ handle_peer_pull_request (void *cls, "# pull request message received", 1, GNUNET_NO); - if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop, + if (NULL != map_single_hop && + GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop, &peer_ctx->peer_id)) { GNUNET_STATISTICS_update (stats, @@ -3770,7 +3771,8 @@ send_pull_request (struct PeerContext *peer_ctx) "# pull request send issued", 1, GNUNET_NO); - if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop, + if (NULL != map_single_hop && + GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop, &peer_ctx->peer_id)) { GNUNET_STATISTICS_update (stats,