summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/dirserv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 8b215011f3..24b4d5483b 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1597,6 +1597,8 @@ dirserv_get_runningrouters(void)
cached_dir_t *
dirserv_get_consensus(const char *flavor_name)
{
+ if (!cached_consensuses)
+ return NULL;
return strmap_get(cached_consensuses, flavor_name);
}