diff --git a/pkg/local_object_storage/writecache/get.go b/pkg/local_object_storage/writecache/get.go index d2496e44..5194446e 100644 --- a/pkg/local_object_storage/writecache/get.go +++ b/pkg/local_object_storage/writecache/get.go @@ -84,6 +84,9 @@ func (c *cache) Head(ctx context.Context, addr oid.Address) (*objectSDK.Object, // // Returns an error of type apistatus.ObjectNotFound if the requested object is missing in db. func Get(db *bbolt.DB, key []byte) ([]byte, error) { + if db == nil { + return nil, ErrNotInitialized + } var value []byte err := db.View(func(tx *bbolt.Tx) error { b := tx.Bucket(defaultBucket)