mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-04 08:46:09 +00:00
Fixed a problem when saving non-indexed images (reported by Trent Gamblin)
This commit is contained in:
parent
9b755b2834
commit
1851db4ac7
@ -1,3 +1,8 @@
|
||||
2007-12-08 David A. Capello <dacap@users.sourceforge.net>
|
||||
|
||||
* src/file/png_format.c (save_PNG): Fixed a problem when saving
|
||||
non-indexed images (reported by Trent Gamblin).
|
||||
|
||||
2007-12-06 David A. Capello <dacap@users.sourceforge.net>
|
||||
|
||||
* src/widgets/editor/editor.c (editor_draw_sprite): Fixed to allow
|
||||
|
@ -488,8 +488,10 @@ static int save_PNG(Sprite *sprite)
|
||||
libpng mallocs info_ptr->palette, libpng will free it). If you
|
||||
allocated it with malloc() instead of png_malloc(), use free() instead
|
||||
of png_free(). */
|
||||
png_free(png_ptr, palette);
|
||||
palette = NULL;
|
||||
if (image->imgtype == IMAGE_INDEXED) {
|
||||
png_free(png_ptr, palette);
|
||||
palette = NULL;
|
||||
}
|
||||
|
||||
/* clean up after the write, and free any memory allocated */
|
||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
|
Loading…
Reference in New Issue
Block a user