You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-libs/giflib/files/giflib-4.1.6-gif2rle.patch

19 lines
764 B

https://sourceforge.net/tracker/index.php?func=detail&aid=1829712&group_id=102202&atid=631304
--- giflib/util/gif2rle.c
+++ giflib/util/gif2rle.c
@@ -222,11 +222,8 @@
ColorMap = (GifFile->Image.ColorMap ?
GifFile->Image.ColorMap->Colors :
GifFile->SColorMap->Colors);
- if (ColorMap == NULL) {
- fprintf(stderr, "Gif Image does not have a colormap\n");
- exit(EXIT_FAILURE);
- }
- ColorMapSize = 1 << ColorMap->BitsPerPixel;
+ ColorMapSize = 1 << (GifFile->Image.ColorMap ? GifFile->Image.ColorMap->BitsPerPixel :
+ GifFile->SColorMap->BitsPerPixel);
DumpScreen2Rle(ScreenBuffer, GifFile->SWidth, GifFile->SHeight);
if (DGifCloseFile(GifFile) == GIF_ERROR) {