diff src/dgif_lib.c @ 129:e292c9648bb9 xemacs-20-1p3

Import from CVS: tag xemacs-20-1p3
author cvs
date Mon, 13 Aug 2007 09:28:38 +0200
parents 8619ce7e4c50
children 2d532a89d707
line wrap: on
line diff
--- a/src/dgif_lib.c	Mon Aug 13 09:28:11 2007 +0200
+++ b/src/dgif_lib.c	Mon Aug 13 09:28:38 2007 +0200
@@ -240,6 +240,15 @@
 	    GifFile->SColorMap->Colors[i].Green = Buf[1];
 	    GifFile->SColorMap->Colors[i].Blue = Buf[2];
 	}
+    } else {
+	/* XEmacs assumes we always have a colormap */
+	GifFile->SColorMap = MakeMapObject(2, NULL);
+	GifFile->SColorMap->Colors[0].Red = 0;
+	GifFile->SColorMap->Colors[0].Green = 0;
+	GifFile->SColorMap->Colors[0].Blue = 0;
+	GifFile->SColorMap->Colors[1].Red = 0xff;
+	GifFile->SColorMap->Colors[1].Green = 0xff;
+	GifFile->SColorMap->Colors[1].Blue = 0xff;
     }
 
     return GIF_OK;