diff --git a/storage/reader.go b/storage/reader.go index 02589782e47..86153256c38 100644 --- a/storage/reader.go +++ b/storage/reader.go @@ -541,8 +541,8 @@ func (o *ObjectHandle) newRangeReaderWithGRPC(ctx context.Context, offset, lengt } // Only support checksums when reading an entire object, not a range. - if msg.GetObjectChecksums().Crc32C != nil && offset == 0 && length == 0 { - r.wantCRC = msg.GetObjectChecksums().GetCrc32C() + if checksums := msg.GetObjectChecksums(); checksums != nil && checksums.Crc32C != nil && offset == 0 && length == 0 { + r.wantCRC = checksums.GetCrc32C() r.checkCRC = true }