Skip to content

Commit f07abdc

Browse files
authored
bug: Check if nsg.ID is null (#439)
1 parent 0b4221c commit f07abdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cloud/scope/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func GetNsgNamesFromId(ids []string, nsgs []*infrastructurev1beta2.NSG) []string
3232
names := make([]string, 0)
3333
for _, id := range ids {
3434
for _, nsg := range nsgs {
35-
if id == *nsg.ID {
35+
if nsg != nil && nsg.ID != nil && id == *nsg.ID {
3636
names = append(names, nsg.Name)
3737
}
3838
}

0 commit comments

Comments
 (0)