prevent appending nil buffer

This commit is contained in:
Darien Raymond
2018-03-29 21:40:23 +02:00
parent bb46a96f04
commit fa6ff77cee

View File

@@ -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.