http://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) {