Skip to content

Commit

Permalink
Also don't operate if resp is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Jan 29, 2020
1 parent 9894f8d commit 5a8cf19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (c *APIClient) Delete(url string) error {
if err != nil {
return err
}
if resp.Body != nil {
if resp != nil && resp.Body != nil {
resp.Body.Close()
}
return nil
Expand Down

0 comments on commit 5a8cf19

Please sign in to comment.