Skip to content

Commit

Permalink
Add nil check for IPConfigurationPropertiesFormat
Browse files Browse the repository at this point in the history
Signed-off-by: Sergen Yalçın <[email protected]>
  • Loading branch information
sergenyalcin committed May 13, 2022
1 parent f4edc1c commit dcd50e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/clients/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func GeneratePublicIPAddressObservation(az networkmgmt.PublicIPAddress) *v1alpha
v.ID = azure.ToString(az.ID)
v.Address = azure.ToString(az.IPAddress)
v.Version = string(az.PublicIPAddressVersion)
if az.IPConfiguration != nil {
if az.PublicIPAddressPropertiesFormat != nil && az.PublicIPAddressPropertiesFormat.IPConfiguration != nil && az.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat != nil {
v.IPConfiguration = &v1alpha3.IPConfiguration{
PrivateIPAllocationMethod: string(az.IPConfiguration.PrivateIPAllocationMethod),
PrivateIPAddress: az.IPConfiguration.PrivateIPAddress,
Expand Down

0 comments on commit dcd50e3

Please sign in to comment.