guard against a nil dereference
This commit is contained in:
parent
244e727c6f
commit
dd0ca302de
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue