Skip to content

Commit

Permalink
Merge pull request #7230 from walidghallab/fix-bugs
Browse files Browse the repository at this point in the history
Fix nil pointer check in nodegroup_manager.go
  • Loading branch information
k8s-ci-robot committed Sep 2, 2024
2 parents 0d95f31 + a91c771 commit d3cbc10
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type CreateNodeGroupResult struct {
// AllCreatedNodeGroups returns all created node groups.
func (r CreateNodeGroupResult) AllCreatedNodeGroups() []cloudprovider.NodeGroup {
var result []cloudprovider.NodeGroup
if r.MainCreatedNodeGroup != nil || !reflect.ValueOf(r.MainCreatedNodeGroup).IsNil() {
if r.MainCreatedNodeGroup != nil && !reflect.ValueOf(r.MainCreatedNodeGroup).IsNil() {
result = append(result, r.MainCreatedNodeGroup)
}
result = append(result, r.ExtraCreatedNodeGroups...)
Expand Down

0 comments on commit d3cbc10

Please sign in to comment.