diff --git a/histogram.go b/histogram.go index 26d93a7..0d953d5 100644 --- a/histogram.go +++ b/histogram.go @@ -125,6 +125,10 @@ func (h *Histogram) Merge(b *Histogram) { if db == nil { continue } + if h.decimalBuckets[i] == nil { + var b [bucketsPerDecimal]uint64 + h.decimalBuckets[i] = &b + } for j := range db { h.decimalBuckets[i][j] = db[j] }