From 1ec633470b34af9a2493739ae8ef11166a9fd95a Mon Sep 17 00:00:00 2001 From: partisan Date: Tue, 10 Jun 2025 19:02:11 +0200 Subject: [PATCH] Fix crash when no image search engines are selected --- images.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/images.go b/images.go index 17edb87..ca79dbe 100755 --- a/images.go +++ b/images.go @@ -135,6 +135,11 @@ func fetchImageResults(query, safe, lang string, page int, synchronous bool, thu return results } + if len(imageSearchEngines) == 0 { + printWarn("No image search engines configured in imageSearchEngines") + return nil + } + engineCount := len(imageSearchEngines) // Determine the engine to use based on the page number