forked from TrueCloudLab/frostfs-node
[#1449] object/delete: Fix NPE in collectChain
`head.previous` method returns (nil, nil) if object has no previous neighbor. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
96cdc04705
commit
cc6209e8a0
1 changed files with 4 additions and 2 deletions
|
@ -153,10 +153,12 @@ func (exec *execCtx) collectChain() bool {
|
|||
exec.status = statusOK
|
||||
exec.err = nil
|
||||
|
||||
withPrev = true
|
||||
withPrev = p != nil
|
||||
if withPrev {
|
||||
prev = *p
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exec.addMembers(chain)
|
||||
|
||||
|
|
Loading…
Reference in a new issue