don't panic on nil

This commit is contained in:
Asim Aslam 2020-01-01 21:56:29 +00:00
parent 6358b9277d
commit e697912ee5

View File

@ -64,6 +64,9 @@ func (w wrapCodec) Unmarshal(data []byte, v interface{}) error {
b.Data = data b.Data = data
return nil return nil
} }
if v == nil {
return nil
}
return w.Codec.Unmarshal(data, v) return w.Codec.Unmarshal(data, v)
} }