[mapserver-commits] r12829 - trunk/mapserver/mapcache/src

svn at osgeo.org svn at osgeo.org
Tue Nov 29 16:26:30 EST 2011


Author: tbonfort
Date: 2011-11-29 13:26:30 -0800 (Tue, 29 Nov 2011)
New Revision: 12829

Modified:
   trunk/mapserver/mapcache/src/imageio.c
Log:
prevent segfault in empty image creation if defautl image format is set to "mixed"


Modified: trunk/mapserver/mapcache/src/imageio.c
===================================================================
--- trunk/mapserver/mapcache/src/imageio.c	2011-11-29 15:34:14 UTC (rev 12828)
+++ trunk/mapserver/mapcache/src/imageio.c	2011-11-29 21:26:30 UTC (rev 12829)
@@ -75,7 +75,7 @@
    unsigned int color=0;
 
    /* create a transparent image for PNG, and a white one for jpeg */
-   if(!strstr(cfg->default_image_format->mime_type,"png")) {
+   if(cfg->default_image_format->mime_type && !strstr(cfg->default_image_format->mime_type,"png")) {
       color = 0xffffffff;
    }
    cfg->empty_image = cfg->default_image_format->create_empty_image(ctx, cfg->default_image_format,



More information about the mapserver-commits mailing list