From f2a3169fabffc39b63b8b4890c88f2a07be14b1f Mon Sep 17 00:00:00 2001 From: Shraddha Bang Date: Wed, 16 Oct 2024 16:02:41 -0700 Subject: [PATCH] Fix controller crash due enabling shield protection after AWS SDK Go v2 upgrades --- pkg/deploy/shield/protection_manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/deploy/shield/protection_manager.go b/pkg/deploy/shield/protection_manager.go index 12f98529d..b8266fbad 100644 --- a/pkg/deploy/shield/protection_manager.go +++ b/pkg/deploy/shield/protection_manager.go @@ -125,7 +125,7 @@ func (m *defaultProtectionManager) GetProtection(ctx context.Context, resourceAR return nil, err } } - if resp.Protection != nil { + if resp != nil && resp.Protection != nil { protectionInfo = &ProtectionInfo{ Name: awssdk.ToString(resp.Protection.Name), ID: awssdk.ToString(resp.Protection.Id),