diff --git a/codec.go b/codec.go index 356f8e8..a1d4a65 100644 --- a/codec.go +++ b/codec.go @@ -64,6 +64,9 @@ func (w wrapCodec) Unmarshal(data []byte, v interface{}) error { b.Data = data return nil } + if v == nil { + return nil + } return w.Codec.Unmarshal(data, v) }