diff --git a/src/sync/pool.go b/src/sync/pool.go index 11181f1f..410f1aad 100644 --- a/src/sync/pool.go +++ b/src/sync/pool.go @@ -8,6 +8,9 @@ type Pool struct { // Get returns the value of calling Pool.New(). func (p *Pool) Get() interface{} { + if p.New == nil { + return nil + } return p.New() }