From fed1951e664a8f9fcaba3fe165519e1bd86fa45d Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Fri, 23 Oct 2020 10:07:02 -0400 Subject: [PATCH] meme: add missing error check --- plugins/meme/meme.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/meme/meme.go b/plugins/meme/meme.go index 7cfa102..da19318 100644 --- a/plugins/meme/meme.go +++ b/plugins/meme/meme.go @@ -346,7 +346,9 @@ func (p *MemePlugin) genMeme(meme string, bully image.Image, config []memeText) u, err := url.Parse(imgName) if err != nil || u.Scheme == "" { log.Debug().Err(err).Str("imgName", imgName).Msgf("url not detected") - u, _ = url.Parse("https://imgflip.com/s/meme/" + imgName) + if u, err = url.Parse("https://imgflip.com/s/meme/" + imgName); err != nil { + return "", 0, 0, err + } } log.Debug().Msgf("Attempting to download url: %s", u.String())