mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-22 09:24:15 +03:00
Add .spr -> image/x-riscos-sprite MIME mapping to GTK front end
Fix crash inducing bugs in nssprite.c svn path=/trunk/netsurf/; revision=6743
This commit is contained in:
parent
a074bdbe54
commit
07e1187b69
@ -64,6 +64,7 @@ void gtk_fetch_filetype_init(const char *mimefile)
|
||||
hash_add(mime_hash, "gif", "image/gif");
|
||||
hash_add(mime_hash, "png", "image/png");
|
||||
hash_add(mime_hash, "jng", "image/jng");
|
||||
hash_add(mime_hash, "spr", "image/x-riscos-sprite");
|
||||
|
||||
if (fh == NULL) {
|
||||
LOG(("Unable to open a mime.types file, so using a minimal one for you."));
|
||||
|
@ -61,7 +61,7 @@ bool nssprite_convert(struct content *c, int width, int height)
|
||||
|
||||
struct rosprite_mem_context* ctx;
|
||||
ERRCHK(rosprite_create_mem_context((uint8_t *) c->source_data,
|
||||
c->total_size, &ctx));
|
||||
c->source_size, &ctx));
|
||||
|
||||
struct rosprite_area* sprite_area;
|
||||
ERRCHK(rosprite_load(rosprite_mem_reader, ctx, &sprite_area));
|
||||
@ -118,7 +118,8 @@ bool nssprite_convert(struct content *c, int width, int height)
|
||||
|
||||
void nssprite_destroy(struct content *c)
|
||||
{
|
||||
rosprite_destroy_sprite_area(c->data.nssprite.sprite_area);
|
||||
if (c->data.nssprite.sprite_area != NULL)
|
||||
rosprite_destroy_sprite_area(c->data.nssprite.sprite_area);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user