Skip to content

Commit d6499a7

Browse files
committed
Return after sending an error if currentAsset is nil
1 parent 4783fef commit d6499a7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

handlers/download.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ func Download(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
103103

104104
if currentAsset == nil {
105105
sendErrorWithCode(w, "Unable to find a release asset for your platform in the latest release.", 400)
106+
return
106107
}
107108

108109
log.Printf("User-Agent: %s", r.Header.Get("User-Agent"))

0 commit comments

Comments
 (0)