summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2011-12-31 12:57:47 +0000
committerVincent Sanders <vince@netsurf-browser.org>2011-12-31 12:57:47 +0000
commit7124d96b1f974799e5b0ea140a7ebf67208a119f (patch)
tree902aa24ce4b2d9a76d701c5ed6aeae5056864907 /image
parente0596793e1a1c34786586cb18ee4fc8652ef7c50 (diff)
downloadnetsurf-7124d96b1f974799e5b0ea140a7ebf67208a119f.tar.gz
netsurf-7124d96b1f974799e5b0ea140a7ebf67208a119f.tar.bz2
ensure favicon is correctly set
svn path=/trunk/netsurf/; revision=13358
Diffstat (limited to 'image')
-rw-r--r--image/ico.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/image/ico.c b/image/ico.c
index ed0804ba9..65a85c2d4 100644
--- a/image/ico.c
+++ b/image/ico.c
@@ -135,6 +135,7 @@ static bool nsico_convert(struct content *c)
bmp = ico_find(ico->ico, 255, 255);
if (bmp == NULL) {
/* return error */
+ LOG(("Failed to select icon"));
return false;
}
@@ -155,12 +156,18 @@ static bool nsico_redraw(struct content *c, struct content_redraw_data *data,
/* select most appropriate sized icon for size */
bmp = ico_find(ico->ico, data->width, data->height);
+ if (bmp == NULL) {
+ /* return error */
+ LOG(("Failed to select icon"));
+ return false;
+ }
/* ensure its decided */
if (bmp->decoded == false) {
if (bmp_decode(bmp) != BMP_OK) {
return false;
} else {
+ LOG(("Decoding bitmap"));
bitmap_modified(bmp->bitmap);
}
@@ -218,7 +225,14 @@ static void *nsico_get_internal(const struct content *c, void *context)
nsico_content *ico = (nsico_content *) c;
/* TODO: Pick best size for purpose.
* Currently assumes it's for a URL bar. */
- struct bmp_image *bmp = ico_find(ico->ico, 16, 16);
+ struct bmp_image *bmp;
+
+ bmp = ico_find(ico->ico, 16, 16);
+ if (bmp == NULL) {
+ /* return error */
+ LOG(("Failed to select icon"));
+ return NULL;
+ }
if (bmp->decoded == false) {
if (bmp_decode(bmp) != BMP_OK) {