Skip to content

Commit

Permalink
Merge pull request #694 from ioito/hotfix/qx-avoid-azure-panic
Browse files Browse the repository at this point in the history
fix(azure): avid panic
  • Loading branch information
ioito authored Jan 11, 2024
2 parents d0a70e1 + e0befbf commit 1b28734
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/multicloud/azure/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (self *SInstance) GetSecurityGroupIds() ([]string, error) {
secgroupIds := []string{}
if nics, err := self.getNics(); err == nil {
for _, nic := range nics {
if len(nic.Properties.NetworkSecurityGroup.ID) > 0 {
if nic.Properties.NetworkSecurityGroup != nil && len(nic.Properties.NetworkSecurityGroup.ID) > 0 {
secgroupIds = append(secgroupIds, strings.ToLower(nic.Properties.NetworkSecurityGroup.ID))
}
}
Expand Down

0 comments on commit 1b28734

Please sign in to comment.