Skip to content

Commit

Permalink
rds/option_group: Protect against null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
YakDriver committed Sep 18, 2023
1 parent 448d6f1 commit 8b15fd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/service/rds/flex.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ func flattenOptions(apiOptions []*rds.Option, optionConfigurations []*rds.Option
"vpc_security_group_memberships": schema.NewSet(schema.HashString, vpcSecurityGroupMemberships),
}

if apiOption.OptionVersion != nil && configuredOption.OptionVersion != nil {
if apiOption.OptionVersion != nil && configuredOption != nil && configuredOption.OptionVersion != nil {
r["version"] = aws.StringValue(apiOption.OptionVersion)
}

if apiOption.Port != nil && configuredOption.Port != nil {
if apiOption.Port != nil && configuredOption != nil && configuredOption.Port != nil {
r["port"] = aws.Int64Value(apiOption.Port)
}

Expand Down

0 comments on commit 8b15fd9

Please sign in to comment.