Check for resBody != nil on JSON decode

This commit is contained in:
Reverite 2019-05-08 13:29:31 -07:00
parent f9a6d11d38
commit 158bd27e25
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ func (cli *Client) MakeRequest(method string, httpURL string, reqBody interface{
}
}
if res.Body != nil {
if resBody != nil && res.Body != nil {
return json.NewDecoder(res.Body).Decode(&resBody)
}