Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Fix potential nil pointer dereference when VM tags are empty (#4117)
Browse files Browse the repository at this point in the history
  • Loading branch information
mboersma authored and jackfrancis committed Oct 24, 2018
1 parent 4e8c8b5 commit a3c9bb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/operations/kubernetesupgrade/upgradecluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ func (uc *UpgradeCluster) addVMToAgentPool(vm compute.VirtualMachine, isUpgradab
}

orchestrator := "unknown"
if vm.Tags != nil {
if vm.Tags != nil && vm.Tags["orchestrator"] != nil {
orchestrator = *vm.Tags["orchestrator"]
}
if isUpgradableVM {
Expand Down

0 comments on commit a3c9bb1

Please sign in to comment.