From 662e950e48b4ad595e602dfc4d51feb9ce75dbbb Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 27 May 2014 11:39:02 +0100 Subject: ensure hlcache handle is not passed as NULL --- desktop/searchweb.c | 7 ++++--- 1 file 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); -- cgit v1.2.3