Skip to content

Commit 44b09e7

Browse files
committed
fix static
1 parent 716425a commit 44b09e7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

utils/results/common.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,9 +1042,12 @@ func BomToFullTree(sbom *cyclonedx.BOM, convertToXrayCompId bool) (fullDependenc
10421042
}
10431043

10441044
func populateDepsNodeDataFromBom(node *xrayUtils.GraphNode, dependencies *[]cyclonedx.Dependency, dependencyAppearances map[string]int8) {
1045+
if node == nil {
1046+
return
1047+
}
10451048
dependencyAppearances[node.Id]++
1046-
if node == nil || dependencyAppearances[node.Id] >= MaxUniqueAppearances || node.NodeHasLoop() {
1047-
// If the node is nil or has a loop or appeared too many times, stop the recursion
1049+
if dependencyAppearances[node.Id] >= MaxUniqueAppearances || node.NodeHasLoop() {
1050+
// If the node has a loop or appeared too many times, stop the recursion
10481051
return
10491052
}
10501053
for _, dep := range cdxutils.GetDirectDependencies(dependencies, node.Id) {

0 commit comments

Comments
 (0)