fix(inputs.ecs): Check for nil pointer before use (#15456)

This commit is contained in:
Joshua Powers 2024-06-06 11:45:00 -06:00 committed by GitHub
parent 72b92398c1
commit c32f7efd8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ func mergeTaskStats(task *Task, stats map[string]*types.StatsJSON) {
continue
}
stat, ok := stats[c.ID]
if !ok {
if !ok || stat == nil {
continue
}
c.Stats = *stat