aboutsummaryrefslogtreecommitdiff
path: root/src/or/rephist.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2012-09-10 18:25:57 -0400
committerRoger Dingledine <arma@torproject.org>2012-09-10 18:25:57 -0400
commitd85b563dbb0c57bc5731e664952ed3f8b9a8f6e8 (patch)
tree29d4732b31c1f5309ada36b3a37a48a3fbf68303 /src/or/rephist.c
parent19b2126119cc3eb39bcfd6055557440d84510f51 (diff)
parent8731a4e148e23d8edbb7f32bdfeee30c326f33cc (diff)
downloadtor-d85b563dbb0c57bc5731e664952ed3f8b9a8f6e8.tar
tor-d85b563dbb0c57bc5731e664952ed3f8b9a8f6e8.tar.gz
Merge branch 'maint-0.2.3'
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r--src/or/rephist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 1c5b51110..f9c0b5beb 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -1675,7 +1675,8 @@ rep_hist_load_bwhist_state_section(bw_array_t *b,
uint64_t v, mv;
int i,ok,ok_m;
- int have_maxima = (smartlist_len(s_values) == smartlist_len(s_maxima));
+ int have_maxima = s_maxima && s_values &&
+ (smartlist_len(s_values) == smartlist_len(s_maxima));
if (s_values && s_begins >= now - NUM_SECS_BW_SUM_INTERVAL*NUM_TOTALS) {
start = s_begins - s_interval*(smartlist_len(s_values));