Skip to content

Commit

Permalink
fixed nill pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
daveshanley committed Nov 14, 2024
1 parent 27d7834 commit 7d2db03
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions what-changed/model/paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,15 @@ func ComparePaths(l, r any) *PathsChanges {
lKeys := make(map[string]low.ValueReference[*v3.PathItem])
rKeys := make(map[string]low.ValueReference[*v3.PathItem])

for k, v := range lPath.PathItems.FromOldest() {
lKeys[k.Value] = v
if lPath != nil && lPath.PathItems != nil {
for k, v := range lPath.PathItems.FromOldest() {
lKeys[k.Value] = v
}
}
for k, v := range rPath.PathItems.FromOldest() {
rKeys[k.Value] = v
if rPath != nil && rPath.PathItems != nil {
for k, v := range rPath.PathItems.FromOldest() {
rKeys[k.Value] = v
}
}

// run every comparison in a thread.
Expand Down

0 comments on commit 7d2db03

Please sign in to comment.