summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2011-10-07 19:39:52 +0000
committerVincent Sanders <vince@netsurf-browser.org>2011-10-07 19:39:52 +0000
commit33af42360f4609e30efaf72b241dfaae8998db07 (patch)
tree14b3225d68e007d38db3e27cc314f8f39661e2b1 /image
parentc22373e000fa545b2db23b6988c718e3acd95520 (diff)
downloadnetsurf-33af42360f4609e30efaf72b241dfaae8998db07.tar.gz
netsurf-33af42360f4609e30efaf72b241dfaae8998db07.tar.bz2
fix ico handler to actually decode to bitmap when called via get_internal
svn path=/trunk/netsurf/; revision=12980
Diffstat (limited to 'image')
-rw-r--r--image/ico.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/image/ico.c b/image/ico.c
index 6a8da57ea..7b76ca447 100644
--- a/image/ico.c
+++ b/image/ico.c
@@ -215,6 +215,13 @@ static nserror nsico_clone(const struct content *old, struct content **newc)
static void *nsico_get_internal(const struct content *c, void *context)
{
nsico_content *ico = (nsico_content *) c;
+ struct bmp_image *bmp = ico_find(ico->ico, 255, 255);
+
+ if (!bmp->decoded)
+ if (bmp_decode(bmp) != BMP_OK)
+ return NULL;
+
+ ico->bitmap = bmp->bitmap;
return ico->bitmap;
}