don't panic on nil

This commit is contained in:
Asim Aslam 2020-01-01 21:56:29 +00:00 committed by Vasiliy Tolstov
parent c61072ccb9
commit 7e8f3ef103

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)
} }