diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2011-10-07 19:39:52 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2011-10-07 19:39:52 +0000 |
commit | 33af42360f4609e30efaf72b241dfaae8998db07 (patch) | |
tree | 14b3225d68e007d38db3e27cc314f8f39661e2b1 /image | |
parent | c22373e000fa545b2db23b6988c718e3acd95520 (diff) | |
download | netsurf-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.c | 7 |
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; } |