aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/image.c b/src/image.c
index 7a258df5a3b..b330ab38931 100644
--- a/src/image.c
+++ b/src/image.c
@@ -7886,13 +7886,14 @@ gif_load (f, img)
7886 init_color_table (); 7886 init_color_table ();
7887 bzero (pixel_colors, sizeof pixel_colors); 7887 bzero (pixel_colors, sizeof pixel_colors);
7888 7888
7889 for (i = 0; i < gif_color_map->ColorCount; ++i) 7889 if (gif_color_map)
7890 { 7890 for (i = 0; i < gif_color_map->ColorCount; ++i)
7891 int r = gif_color_map->Colors[i].Red << 8; 7891 {
7892 int g = gif_color_map->Colors[i].Green << 8; 7892 int r = gif_color_map->Colors[i].Red << 8;
7893 int b = gif_color_map->Colors[i].Blue << 8; 7893 int g = gif_color_map->Colors[i].Green << 8;
7894 pixel_colors[i] = lookup_rgb_color (f, r, g, b); 7894 int b = gif_color_map->Colors[i].Blue << 8;
7895 } 7895 pixel_colors[i] = lookup_rgb_color (f, r, g, b);
7896 }
7896 7897
7897#ifdef COLOR_TABLE_SUPPORT 7898#ifdef COLOR_TABLE_SUPPORT
7898 img->colors = colors_in_color_table (&img->ncolors); 7899 img->colors = colors_in_color_table (&img->ncolors);