mirror of
https://github.com/matrix-org/gomatrix
synced 2025-06-06 14:53:22 +00:00
Check for resBody != nil on JSON decode
This commit is contained in:
parent
f9a6d11d38
commit
158bd27e25
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue