Skip to content

Commit

Permalink
[#1449] object/delete: Fix NPE in collectChain
Browse files Browse the repository at this point in the history
`head.previous` method returns (nil, nil) if object has no previous
neighbor.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
  • Loading branch information
Leonard Lyubich authored and cthulhu-rider committed May 30, 2022
1 parent 96cdc04 commit cc6209e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/services/object/delete/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@ func (exec *execCtx) collectChain() bool {
exec.status = statusOK
exec.err = nil

withPrev = true
prev = *p
withPrev = p != nil
if withPrev {
prev = *p
}
}
}

Expand Down

0 comments on commit cc6209e

Please sign in to comment.