Skip to content

Commit a8788bc

Browse files
committed
azurepathfix: check if platform status is nil before accessing it
1 parent f3f2784 commit a8788bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/operator/azurepathfixcontroller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (c *AzurePathFixController) sync() error {
168168
if err != nil {
169169
return fmt.Errorf("unable to get infrastructure object: %s", err)
170170
}
171-
if infra.Status.PlatformStatus.Type != configapiv1.AzurePlatformType {
171+
if infra.Status.PlatformStatus != nil && infra.Status.PlatformStatus.Type != configapiv1.AzurePlatformType {
172172
return nil
173173
}
174174

0 commit comments

Comments
 (0)