From d6499a7f9421555b1e76629f5eb0039fb9868662 Mon Sep 17 00:00:00 2001 From: Suyash Kumar Date: Thu, 15 Jul 2021 18:49:56 -0400 Subject: [PATCH] Return after sending an error if currentAsset is nil --- handlers/download.go | 1 + 1 file changed, 1 insertion(+) diff --git a/handlers/download.go b/handlers/download.go index e886eff..727a352 100644 --- a/handlers/download.go +++ b/handlers/download.go @@ -103,6 +103,7 @@ func Download(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { if currentAsset == nil { sendErrorWithCode(w, "Unable to find a release asset for your platform in the latest release.", 400) + return } log.Printf("User-Agent: %s", r.Header.Get("User-Agent"))