diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-src/src/gd_gif_in.c')
-rw-r--r-- | Build/source/libs/gd/libgd-src/src/gd_gif_in.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Build/source/libs/gd/libgd-src/src/gd_gif_in.c b/Build/source/libs/gd/libgd-src/src/gd_gif_in.c index 1ae0e32b23f..2b6b34e2768 100644 --- a/Build/source/libs/gd/libgd-src/src/gd_gif_in.c +++ b/Build/source/libs/gd/libgd-src/src/gd_gif_in.c @@ -315,8 +315,10 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromGifCtx(gdIOCtxPtr fd) ReadImage(im, fd, width, height, localColorMap, BitSet(buf[8], INTERLACE), &ZeroDataBlock); } else { if(!haveGlobalColormap) { - gdImageDestroy(im); - return 0; + // Still a valid gif, apply simple default palette as per spec + ColorMap[CM_RED][1] = 0xff; + ColorMap[CM_GREEN][1] = 0xff; + ColorMap[CM_BLUE][1] = 0xff; } ReadImage(im, fd, width, height, ColorMap, BitSet(buf[8], INTERLACE), &ZeroDataBlock); |