Skip to content

Commit

Permalink
Fix potential nil pointer deref (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
j2L4e authored Aug 22, 2024
1 parent da70f13 commit 7424f6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/infrastructure/ensurer/networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func EnsureNetworks(ctx context.Context, client *hcloud.Client, namespace, zone
// namespace string Shoot namespace
// networks *apis.InfrastructureConfigNetworkIDs Network IDs struct
func EnsureNetworksDeleted(ctx context.Context, client *hcloud.Client, namespace string, networks *apis.InfrastructureConfigNetworkIDs) error {
if "" != networks.Workers {
if networks != nil && "" != networks.Workers {
name := fmt.Sprintf("%s-workers", namespace)

network, _, err := client.Network.GetByName(ctx, name)
Expand Down

0 comments on commit 7424f6b

Please sign in to comment.