Check if metric is nil before calling SetAggregate

fixes #2146
This commit is contained in:
Cameron Sparr
2016-12-13 12:24:39 +00:00
parent b58926dd26
commit cab1118c31
3 changed files with 9 additions and 4 deletions

View File

@@ -70,7 +70,9 @@ func (r *RunningAggregator) MakeMetric(
t,
)
m.SetAggregate(true)
if m != nil {
m.SetAggregate(true)
}
return m
}