aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/microdesc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/microdesc.c b/src/or/microdesc.c
index 73d2285009..5740c40d5f 100644
--- a/src/or/microdesc.c
+++ b/src/or/microdesc.c
@@ -423,7 +423,7 @@ microdesc_cache_rebuild(microdesc_cache_t *cache, int force)
cache->journal_len = 0;
cache->bytes_dropped = 0;
- new_size = (int)cache->cache_content->size;
+ new_size = cache->cache_content ? (int)cache->cache_content->size : 0;
log_info(LD_DIR, "Done rebuilding microdesc cache. "
"Saved %d bytes; %d still used.",
orig_size-new_size, new_size);