[mapserver-commits] r10094 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Sat Apr 10 22:24:14 EDT 2010
Author: warmerdam
Date: 2010-04-10 22:24:13 -0400 (Sat, 10 Apr 2010)
New Revision: 10094
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapdraw.c
trunk/mapserver/maplegend.c
Log:
avoid crash, and ensure error report when keyimage loading fails (#1594)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2010-04-10 15:26:28 UTC (rev 10093)
+++ trunk/mapserver/HISTORY.TXT 2010-04-11 02:24:13 UTC (rev 10094)
@@ -14,6 +14,8 @@
Current Version (SVN trunk):
----------------------------
+- Avoid crash, and ensure error report when loading keyimage fails (#1594)
+
- Improve the handling of simple string comparisons for raster classified
values (#3425)
Modified: trunk/mapserver/mapdraw.c
===================================================================
--- trunk/mapserver/mapdraw.c 2010-04-10 15:26:28 UTC (rev 10093)
+++ trunk/mapserver/mapdraw.c 2010-04-11 02:24:13 UTC (rev 10094)
@@ -501,7 +501,11 @@
}
if(map->legend.status == MS_EMBED && !map->legend.postlabelcache)
- msEmbedLegend(map, image);
+ {
+ msEmbedLegend(map, image);
+ msFreeImage( image );
+ return NULL;
+ }
if(map->debug >= MS_DEBUGLEVEL_TUNING) msGettimeofday(&starttime, NULL);
Modified: trunk/mapserver/maplegend.c
===================================================================
--- trunk/mapserver/maplegend.c 2010-04-10 15:26:28 UTC (rev 10093)
+++ trunk/mapserver/maplegend.c 2010-04-11 02:24:13 UTC (rev 10094)
@@ -582,6 +582,7 @@
/* render the legend. */
image = msDrawLegend(map, MS_FALSE);
+ if( image == NULL ) return -1;
/* steal the gdImage and free the rest of the imageObj */
map->symbolset.symbol[s]->img = image->img.gd;
More information about the mapserver-commits
mailing list