Browse Source

prevent appending nil buffer

pull/1008/head v3.15
Darien Raymond 7 years ago
parent
commit
fa6ff77cee
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
  1. 4
      common/buf/multi_buffer.go

4
common/buf/multi_buffer.go

@ -57,7 +57,9 @@ func NewMultiBufferValue(b ...*Buffer) MultiBuffer {
// Append appends buffer to the end of this MultiBuffer
func (mb *MultiBuffer) Append(buf *Buffer) {
*mb = append(*mb, buf)
if buf != nil {
*mb = append(*mb, buf)
}
}
// AppendMulti appends a MultiBuffer to the end of this one.

Loading…
Cancel
Save