aboutsummaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'util.go')
-rw-r--r--util.go2
1 files changed, 1 insertions, 1 deletions
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)
}