summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/routerlist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index af096ae5c1..3d61fa5d11 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -875,8 +875,10 @@ router_get_my_share_of_directory_requests(double *v2_share_out,
routerstatus_t *rs;
const int pds_flags = PDS_ALLOW_SELF|PDS_IGNORE_FASCISTFIREWALL;
*v2_share_out = *v3_share_out = 0.0;
+ if (!me)
+ return -1;
rs = router_get_consensus_status_by_id(me->cache_info.identity_digest);
- if (!me || !rs)
+ if (!rs)
return -1;
/* Calling for side effect */