fix(inputs.ecs): Check for nil pointer before use (#15456)
This commit is contained in:
parent
72b92398c1
commit
c32f7efd8e
|
|
@ -70,7 +70,7 @@ func mergeTaskStats(task *Task, stats map[string]*types.StatsJSON) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
stat, ok := stats[c.ID]
|
stat, ok := stats[c.ID]
|
||||||
if !ok {
|
if !ok || stat == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
c.Stats = *stat
|
c.Stats = *stat
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue