Skip to content

Commit

Permalink
Merge pull request #118 from viveksahu26/fix/issue_#116
Browse files Browse the repository at this point in the history
handle nil pointer
  • Loading branch information
riteshnoronha authored Dec 8, 2024
2 parents 8823880 + 0a372ea commit c6b6953
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/assemble/cdx/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func buildToolList(in []*cydx.BOM) *cydx.ToolsChoice {
})

for _, bom := range in {
if bom.Metadata != nil && bom.Metadata.Tools != nil {
if bom.Metadata != nil && bom.Metadata.Tools != nil && bom.Metadata.Tools.Tools != nil {
for _, tool := range *bom.Metadata.Tools.Tools {
*tools.Components = append(*tools.Components, cydx.Component{
Type: cydx.ComponentTypeApplication,
Expand Down

0 comments on commit c6b6953

Please sign in to comment.