Skip to content

Commit 6a0f50e

Browse files
authored
fix(vpc): fix nil pointer dereference on redis endpoint (#3179)
1 parent 9bde51f commit 6a0f50e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/namespaces/vpc/v1/custom_private_network.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func listCustomRedisClusters(client *scw.Client, pn *vpc.PrivateNetwork) ([]cust
288288
var customClusters []customRedis
289289
for _, cluster := range listRedisClusters.Clusters {
290290
for _, endpoint := range cluster.Endpoints {
291-
if endpoint.PrivateNetwork.ID == pn.ID {
291+
if endpoint.PrivateNetwork != nil && endpoint.PrivateNetwork.ID == pn.ID {
292292
customClusters = append(customClusters, customRedis{
293293
ID: cluster.ID,
294294
Name: cluster.Name,

0 commit comments

Comments
 (0)