Skip to content

Commit

Permalink
Fix nil pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
coignetp committed Jan 10, 2025
1 parent 46e81e9 commit 9af3cce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/fleet/internal/cdn/config_datadog_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ type integration struct {

// State returns the agent policies state
func (a *agentConfig) State() *pbgo.PoliciesState {
if a == nil {
return &pbgo.PoliciesState{
Version: "noversion",
}
}
return &pbgo.PoliciesState{
MatchedPolicies: []string{a.policy},
Version: a.version,
Expand Down

0 comments on commit 9af3cce

Please sign in to comment.