Skip to content

Commit

Permalink
Fix null check
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvc committed Apr 23, 2021
1 parent 1522595 commit 7ffe1f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x-pack/heartbeat/monitors/browser/source/zipurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func retryingZipRequest(method string, z *ZipURLSource) (resp *http.Response, er
}
time.Sleep(time.Second)
}
if resp.StatusCode > 300 {
if resp != nil && resp.StatusCode > 300 {
return nil, fmt.Errorf("failed to retrieve zip, received status of %d requesting zip URL", resp.StatusCode)
}
return resp, err
Expand Down

0 comments on commit 7ffe1f0

Please sign in to comment.