Browse Source

Avoid nil case when fixing data

pull/174/head
chrislusf 10 years ago
parent
commit
a4d3f2da3d
  1. 2
      go/storage/needle_read_write.go

2
go/storage/needle_read_write.go

@ -120,7 +120,7 @@ func (n *Needle) Append(w io.Writer, version Version) (size uint32, err error) {
return
}
}
if n.HasTtl() {
if n.HasTtl() && n.Ttl != nil {
n.Ttl.ToBytes(header[0:TtlBytesLength])
if _, err = w.Write(header[0:TtlBytesLength]); err != nil {
return

Loading…
Cancel
Save