Skip to content

Commit

Permalink
handle nil owm1
Browse files Browse the repository at this point in the history
  • Loading branch information
anjor committed Jul 10, 2024
1 parent 07e1d2d commit 6f1d3a8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd-car-split.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,13 @@ func newCmd_SplitCar() *cli.Command {
rd,
iplddecoders.KindBlock,
func(owm1 *accum.ObjectWithMetadata, owm2 []accum.ObjectWithMetadata) error {
if owm1 == nil {
return nil
}

owms := append(owm2, *owm1)
var blockDag []accum.ObjectWithMetadata
dagSize := 0
var blockDag []accum.ObjectWithMetadata
for _, owm := range owms {
// build up a block dag
blockDag = append(blockDag, owm)
Expand Down

0 comments on commit 6f1d3a8

Please sign in to comment.