From 33af42360f4609e30efaf72b241dfaae8998db07 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 7 Oct 2011 19:39:52 +0000 Subject: fix ico handler to actually decode to bitmap when called via get_internal svn path=/trunk/netsurf/; revision=12980 --- image/ico.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'image') 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; } -- cgit v1.2.3