From dd0ca302dee606643bc76efd21ae9493362dae89 Mon Sep 17 00:00:00 2001 From: clint shryock Date: Wed, 27 Jan 2016 10:56:33 -0600 Subject: [PATCH] guard against a nil dereference --- builtin/providers/aws/resource_aws_s3_bucket_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_s3_bucket_test.go b/builtin/providers/aws/resource_aws_s3_bucket_test.go index 6dc5dfc86..9030b49b6 100644 --- a/builtin/providers/aws/resource_aws_s3_bucket_test.go +++ b/builtin/providers/aws/resource_aws_s3_bucket_test.go @@ -443,7 +443,7 @@ func testAccCheckAWSS3BucketWebsite(n string, indexDoc string, errorDoc string, if *v.HostName != redirectTo { return fmt.Errorf("bad redirect to, expected: %s, got %#v", redirectTo, out.RedirectAllRequestsTo) } - if redirectProtocol != "" && *v.Protocol != redirectProtocol { + if redirectProtocol != "" && v.Protocol != nil && *v.Protocol != redirectProtocol { return fmt.Errorf("bad redirect protocol to, expected: %s, got %#v", redirectProtocol, out.RedirectAllRequestsTo) } }