[mapserver-commits] r8533 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Feb 12 02:48:43 EST 2009


Author: unicoletti
Date: 2009-02-12 02:48:42 -0500 (Thu, 12 Feb 2009)
New Revision: 8533

Modified:
   trunk/mapserver/mapdraw.c
Log:
#2803: mapserver will crash when rendering a query map in HILITE mode and there are is no STYLE defined

Modified: trunk/mapserver/mapdraw.c
===================================================================
--- trunk/mapserver/mapdraw.c	2009-02-12 05:24:05 UTC (rev 8532)
+++ trunk/mapserver/mapdraw.c	2009-02-12 07:48:42 UTC (rev 8533)
@@ -1089,6 +1089,10 @@
 
     for(i=0; i<layer->numclasses; i++) {
       if(layer->type == MS_LAYER_POLYGON) { /* alter BOTTOM style since that's almost always the fill */
+	if (layer->class[i]->styles == NULL) {
+           msSetError(MS_MISCERR, "Don't know how to draw class %s of layer %s without a style definition.", "msDrawQueryLayer()", layer->class[i]->name, layer->name);
+           return(MS_FAILURE);
+	}
         if(MS_VALID_COLOR(layer->class[i]->styles[0]->color)) {
           colorbuffer[i] = layer->class[i]->styles[0]->color; /* save the color from the BOTTOM style */
           layer->class[i]->styles[0]->color = map->querymap.color;



More information about the mapserver-commits mailing list