summaryrefslogtreecommitdiff
diff options
authorVincent Sanders <vince@kyllikki.org>2025-02-23 21:56:56 +0000
committerVincent Sanders <vince@kyllikki.org>2025-02-23 21:56:56 +0000
commitd62fca3af67418c7f7708461abfb0b18943728c9 (patch)
treedc6a9ebf771b3e5574b91dc77b44cda89cc7c8a3
parent81226105e90dcfc69ecfbfcf7ef7298c86fa3261 (diff)
downloadnetsurf-d62fca3af67418c7f7708461abfb0b18943728c9.tar.gz
netsurf-d62fca3af67418c7f7708461abfb0b18943728c9.tar.bz2
work around frontends that do not initialise the web search providers
-rw-r--r--desktop/searchweb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/desktop/searchweb.c b/desktop/searchweb.c
index 3a61d2f59..49bc2c454 100644
--- a/desktop/searchweb.c
+++ b/desktop/searchweb.c
@@ -351,7 +351,13 @@ search_web_omni(const char *term,
}
}
- /* must be initialised */
+ /* ensure providers are initialised */
+ if (search_web_ctx.providers == NULL) {
+ ret = search_web_init(NULL);
+ if (ret != NSERROR_OK) {
+ return ret;
+ }
+ }
if (search_web_ctx.providers == NULL) {
return NSERROR_INIT_FAILED;
}
close