From 53323a42e1037dfb6c55ae396c53996ea5606ed9 Mon Sep 17 00:00:00 2001 From: Jordan Date: Fri, 25 Feb 2022 17:30:06 -0700 Subject: util.go: patch nil pointer dereference --- util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.go b/util.go index 5d5de44..0843cca 100644 --- a/util.go +++ b/util.go @@ -293,7 +293,7 @@ func getPaper(client *http.Client, u string) (string, error) { } f(doc) - if dl.String() == "" { + if dl == nil || dl.String() == "" { return "", fmt.Errorf("%q: could not locate PDF direct link", u) } -- cgit v1.2.3-54-g00ecf