provider/aws: Guard against nil values in EC2 Tags

This commit is contained in:
clint shryock 2016-06-20 15:53:04 -05:00
parent 4bb3335541
commit ecc455ebb4
1 changed files with 3 additions and 3 deletions

View File

@ -387,13 +387,13 @@ func ec2TagFiltersToMap(list []*codedeploy.EC2TagFilter) []map[string]string {
result := make([]map[string]string, 0, len(list))
for _, tf := range list {
l := make(map[string]string)
if *tf.Key != "" {
if tf.Key != nil && *tf.Key != "" {
l["key"] = *tf.Key
}
if *tf.Value != "" {
if tf.Value != nil && *tf.Value != "" {
l["value"] = *tf.Value
}
if *tf.Type != "" {
if tf.Type != nil && *tf.Type != "" {
l["type"] = *tf.Type
}
result = append(result, l)