diff options
author | Jordan <me@jordan.im> | 2022-02-25 17:30:06 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2022-02-25 17:30:06 -0700 |
commit | 53323a42e1037dfb6c55ae396c53996ea5606ed9 (patch) | |
tree | 22f7b2c0d0580a0414342e6d8748ca8a84006ca0 | |
parent | 92c560e4e8ba5bc90b4d99d324862c86f9a8e691 (diff) | |
download | crane-53323a42e1037dfb6c55ae396c53996ea5606ed9.tar.gz crane-53323a42e1037dfb6c55ae396c53996ea5606ed9.zip |
util.go: patch nil pointer dereference
-rw-r--r-- | util.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) } |