diff options
author | Bart Polot <bart@net.in.tum.de> | 2015-01-28 19:01:56 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2015-01-28 19:01:56 +0000 |
commit | 41e1c58c1953ad8376b9e9f247d94abd313b4ae8 (patch) | |
tree | e79412fd4199dc32dc31e7bd918dee21d57d0735 /src | |
parent | 6100f5e385506103d15bbd2055eaa1865aacb6c3 (diff) | |
download | gnunet-41e1c58c1953ad8376b9e9f247d94abd313b4ae8.tar.gz gnunet-41e1c58c1953ad8376b9e9f247d94abd313b4ae8.zip |
- avoid NPE
Diffstat (limited to 'src')
-rw-r--r-- | src/rps/gnunet-service-rps.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index fe5db5e6f..4782a69df 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c | |||
@@ -1542,6 +1542,10 @@ cleanup_channel (void *cls, | |||
1542 | RPS_sampler_reinitialise_by_value (peer); | 1542 | RPS_sampler_reinitialise_by_value (peer); |
1543 | 1543 | ||
1544 | peer_ctx = GNUNET_CONTAINER_multipeermap_get (peer_map, peer); | 1544 | peer_ctx = GNUNET_CONTAINER_multipeermap_get (peer_map, peer); |
1545 | |||
1546 | if (NULL == peer_ctx) /* It could have been removed by shutdown_task */ | ||
1547 | return; | ||
1548 | |||
1545 | /* Somwewhat {ab,re}use the iterator function */ | 1549 | /* Somwewhat {ab,re}use the iterator function */ |
1546 | /* Cast to void is ok, because it's used as void in peer_remove_cb */ | 1550 | /* Cast to void is ok, because it's used as void in peer_remove_cb */ |
1547 | (void) peer_remove_cb ((void *) channel, peer, peer_ctx); | 1551 | (void) peer_remove_cb ((void *) channel, peer, peer_ctx); |