summaryrefslogtreecommitdiff
path: root/desktop/searchweb.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-05-27 11:39:02 +0100
committerVincent Sanders <vince@kyllikki.org>2014-05-27 11:39:02 +0100
commit662e950e48b4ad595e602dfc4d51feb9ce75dbbb (patch)
treef1c99c7ca73665d7974670a532ffd18049bab7ca /desktop/searchweb.c
parent1966649c83615a16db678418947147d6f08cc749 (diff)
downloadnetsurf-662e950e48b4ad595e602dfc4d51feb9ce75dbbb.tar.gz
netsurf-662e950e48b4ad595e602dfc4d51feb9ce75dbbb.tar.bz2
ensure hlcache handle is not passed as NULL
Diffstat (limited to 'desktop/searchweb.c')
-rw-r--r--desktop/searchweb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/desktop/searchweb.c b/desktop/searchweb.c
index 9de75bcd8..95d46e483 100644
--- a/desktop/searchweb.c
+++ b/desktop/searchweb.c
@@ -357,7 +357,6 @@ search_web_omni(const char *term,
/* exported interface documented in desktop/searchweb.h */
nserror search_web_select_provider(int selection)
{
- nserror ret;
struct search_provider *provider;
struct bitmap *ico_bitmap = NULL;
@@ -383,10 +382,11 @@ nserror search_web_select_provider(int selection)
if (provider->ico_handle != NULL) {
ico_bitmap = content_get_bitmap(provider->ico_handle);
}
- if (ico_bitmap == NULL) {
+ if ((ico_bitmap == NULL) &&
+ (search_web_ctx.default_ico_handle != NULL)) {
ico_bitmap = content_get_bitmap(search_web_ctx.default_ico_handle);
}
- /* update the callback with teh provider change. Bitmap may
+ /* update the callback with the provider change. Bitmap may
* be NULL at this point.
*/
guit->search_web->provider_update(provider->name, ico_bitmap);
@@ -395,6 +395,7 @@ nserror search_web_select_provider(int selection)
/* if the providers icon has not been retrived get it now */
if (provider->ico_handle == NULL) {
nsurl *icon_nsurl;
+ nserror ret;
/* create search icon url */
ret = nsurl_create(provider->ico, &icon_nsurl);