diff --git a/pkg/services/object/delete/exec.go b/pkg/services/object/delete/exec.go index cfefd8ada4..ab012ab3ed 100644 --- a/pkg/services/object/delete/exec.go +++ b/pkg/services/object/delete/exec.go @@ -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 + } } }