Destroy bitmap if thumbnailing fails.

Make amiga port's thumbnail_create() actually return something

svn path=/trunk/netsurf/; revision=6560
This commit is contained in:
John Mark Bell 2009-02-18 13:25:57 +00:00
parent 15d7987723
commit ae781b4fd8
2 changed files with 6 additions and 1 deletions

View File

@ -21,4 +21,5 @@
bool thumbnail_create(struct content *content, struct bitmap *bitmap,
const char *url)
{
return false;
}

View File

@ -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;