Fix: nil deref panic

This commit is contained in:
kayos@tcp.direct 2023-07-18 21:03:02 -07:00
parent de9b80b6c6
commit 11a2eeb267
Signed by: kayos
GPG Key ID: 4B841471B4BEE979

View File

@ -35,7 +35,7 @@ func ParseArgs() {
// CloseBody is crude error handling for any potential errors closing the response body.
func CloseBody(res *http.Response) {
if res.Body == nil || res == nil {
if res == nil || res.Body == nil {
return
}
err := res.Body.Close()