1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-27 22:36:12 -04:00

prevent appending nil buffer

This commit is contained in:
Darien Raymond 2018-03-29 21:40:23 +02:00
parent bb46a96f04
commit fa6ff77cee
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

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.