mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-10 13:40:36 -08:00
(gif_load): Fix bug: Handle nonexistent colormap.
This commit is contained in:
parent
12451866c7
commit
1ab2cd4392
2 changed files with 12 additions and 7 deletions
|
|
@ -1,3 +1,7 @@
|
|||
2007-09-06 Pixel <pixel@mandriva.com> (tiny change)
|
||||
|
||||
* image.c (gif_load): Fix bug: Handle nonexistent colormap.
|
||||
|
||||
2007-09-06 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* gtkutil.c (menu_grab_callback) <cnt>:
|
||||
|
|
|
|||
15
src/image.c
15
src/image.c
|
|
@ -7886,13 +7886,14 @@ gif_load (f, img)
|
|||
init_color_table ();
|
||||
bzero (pixel_colors, sizeof pixel_colors);
|
||||
|
||||
for (i = 0; i < gif_color_map->ColorCount; ++i)
|
||||
{
|
||||
int r = gif_color_map->Colors[i].Red << 8;
|
||||
int g = gif_color_map->Colors[i].Green << 8;
|
||||
int b = gif_color_map->Colors[i].Blue << 8;
|
||||
pixel_colors[i] = lookup_rgb_color (f, r, g, b);
|
||||
}
|
||||
if (gif_color_map)
|
||||
for (i = 0; i < gif_color_map->ColorCount; ++i)
|
||||
{
|
||||
int r = gif_color_map->Colors[i].Red << 8;
|
||||
int g = gif_color_map->Colors[i].Green << 8;
|
||||
int b = gif_color_map->Colors[i].Blue << 8;
|
||||
pixel_colors[i] = lookup_rgb_color (f, r, g, b);
|
||||
}
|
||||
|
||||
#ifdef COLOR_TABLE_SUPPORT
|
||||
img->colors = colors_in_color_table (&img->ncolors);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue