[#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:
Leonard Lyubich 2022-05-30 09:41:26 +03:00 committed by LeL
parent 96cdc04705
commit cc6209e8a0

View file

@ -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
}
}
}