Skip to content

Commit

Permalink
🐛 guard against nil aws account asset in discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeffrey committed Feb 20, 2024
1 parent b761746 commit f3b56b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions providers/aws/resources/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,10 @@ func Discover(runtime *plugin.Runtime, filters connection.DiscoveryFilters) (*in
if err != nil {
return nil, err
}

awsAccount := res.(*mqlAwsAccount)
var awsAccount *mqlAwsAccount
if res != nil {
awsAccount = res.(*mqlAwsAccount)
}

targets := handleTargets(conn.Conf.Discover.Targets)
for i := range targets {
Expand Down

0 comments on commit f3b56b2

Please sign in to comment.