diff --git a/probe/awsecs/client.go b/probe/awsecs/client.go index e97f7e6d69..3f6110710b 100644 --- a/probe/awsecs/client.go +++ b/probe/awsecs/client.go @@ -240,7 +240,7 @@ func (c ecsClientImpl) getTasks(taskARNs []string) { } for _, task := range resp.Tasks { - if task.TaskArn != nil { + if task != nil && task.TaskArn != nil { c.taskCache.Set(*task.TaskArn, newECSTask(task)) } }