Don't unmarshal if result is nil
This commit is contained in:
parent
02481c4446
commit
0190b1ab3a
@ -86,7 +86,7 @@ func (c *clientCodec) ReadHeader(m *codec.Message) error {
|
||||
}
|
||||
|
||||
func (c *clientCodec) ReadBody(x interface{}) error {
|
||||
if x == nil {
|
||||
if x == nil || c.resp.Result == nil {
|
||||
return nil
|
||||
}
|
||||
return json.Unmarshal(*c.resp.Result, x)
|
||||
|
Loading…
Reference in New Issue
Block a user