diff --git a/client.go b/client.go index baec3132..48213b6e 100644 --- a/client.go +++ b/client.go @@ -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