Skip to content

Commit

Permalink
Don't unmarshal if result is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
Asim committed Jun 30, 2016
1 parent 02481c4 commit 0190b1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codec/jsonrpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0190b1a

Please sign in to comment.