mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
Merge pull request #1612 from weaveworks/fix-memcache-crash
Fix nil pointer error when memcache not enabled
This commit is contained in:
@@ -330,8 +330,12 @@ func (c *dynamoDBCollector) getReports(userid string, row int64, start, end time
|
||||
return nil, err
|
||||
}
|
||||
|
||||
stores := []ReportStore{c.inProcess}
|
||||
if c.memcache != nil {
|
||||
stores = append(stores, c.memcache)
|
||||
}
|
||||
var reports []report.Report
|
||||
for _, store := range []ReportStore{c.inProcess, c.memcache} {
|
||||
for _, store := range stores {
|
||||
if store == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user