From 0fac90960cf584a2f85ec24b01b66f5405ef3f3f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 8 Oct 2015 11:37:17 +0000 Subject: [PATCH] -fix npe --- src/ats/gnunet-service-ats_performance.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ats/gnunet-service-ats_performance.c b/src/ats/gnunet-service-ats_performance.c index 831afb418..654704df8 100644 --- a/src/ats/gnunet-service-ats_performance.c +++ b/src/ats/gnunet-service-ats_performance.c @@ -85,7 +85,8 @@ notify_client (struct GNUNET_SERVER_Client *client, struct GNUNET_SERVER_NotificationContext *nc; char *addrp; - GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope); + if (NULL != prop) + GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope); GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE); msg = (struct PeerInformationMessage *) buf; msg->header.size = htons (msize); @@ -160,7 +161,8 @@ GAS_performance_notify_all_clients (const struct GNUNET_PeerIdentity *peer, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) { - GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope); + if (NULL != prop) + GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope); notify_client (NULL, peer, plugin_name, -- 2.25.1