diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-02-18 13:25:57 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-02-18 13:25:57 +0000 |
commit | ae781b4fd8d205caf108fbf56f0e32171db8ea40 (patch) | |
tree | 2694f38c7fe0b8d0338a02d7c70c61ab5a05a191 | |
parent | 15d7987723656f12c77426b46cf9ce3a6cd37673 (diff) | |
download | netsurf-ae781b4fd8d205caf108fbf56f0e32171db8ea40.tar.gz netsurf-ae781b4fd8d205caf108fbf56f0e32171db8ea40.tar.bz2 |
Destroy bitmap if thumbnailing fails.
Make amiga port's thumbnail_create() actually return something
svn path=/trunk/netsurf/; revision=6560
-rwxr-xr-x | amiga/thumbnail.c | 1 | ||||
-rw-r--r-- | desktop/history_core.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/amiga/thumbnail.c b/amiga/thumbnail.c index 5535f76c7..ea138be65 100755 --- a/amiga/thumbnail.c +++ b/amiga/thumbnail.c @@ -21,4 +21,5 @@ bool thumbnail_create(struct content *content, struct bitmap *bitmap, const char *url) { + return false; } diff --git a/desktop/history_core.c b/desktop/history_core.c index bcc6fc190..97ec9b5f2 100644 --- a/desktop/history_core.c +++ b/desktop/history_core.c @@ -281,7 +281,11 @@ void history_add(struct history *history, struct content *content, warn_user("NoMemory", 0); return; } - thumbnail_create(content, bitmap, url); + if (thumbnail_create(content, bitmap, url) == false) { + /* Thumbnailing failed. Ignore it silently */ + bitmap_destroy(bitmap); + bitmap = NULL; + } } entry->bitmap = bitmap; |