Skip to content

Commit

Permalink
fix: nil pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Oct 24, 2023
1 parent ca3cedf commit 41b6035
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/route53-resolver-rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package resources

import (
"fmt"
"github.com/aws/smithy-go/ptr"

"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/route53resolver"
Expand Down Expand Up @@ -100,7 +101,7 @@ func resolverRulesToVpcIDs(svc *route53resolver.Route53Resolver) (map[string][]*

// Filter removes resources automatically from being nuked
func (r *Route53ResolverRule) Filter() error {
if *r.domainName == "." {
if r.domainName != nil && ptr.ToString(r.domainName) == "." {
return fmt.Errorf(`Filtering DomainName "."`)
}

Expand Down

0 comments on commit 41b6035

Please sign in to comment.