From 79e7913a6ae55a0096207876f506238ac6c24f8e Mon Sep 17 00:00:00 2001 From: Jens Breitbart Date: Mon, 13 Apr 2020 12:28:46 +0200 Subject: [PATCH] Fixed directImageURL incase the image is not in an album --- fromURL.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fromURL.go b/fromURL.go index a1b72df..9937554 100644 --- a/fromURL.go +++ b/fromURL.go @@ -54,7 +54,7 @@ func (client *Client) directImageURL(url string) (*GenericInfo, int, error) { id := url[start:end] client.Log.Debugf("Detected imgur image ID %v. Was going down the i.imgur.com/ path.", id) gii, status, err := client.GetGalleryImageInfo(id) - if status < 400 { + if err == nil && status < 400 { ret.GImage = gii } else { var ii *ImageInfo