[mapserver-commits] r12661 - trunk/mapserver/mapcache/src
svn at osgeo.org
svn at osgeo.org
Fri Oct 14 08:43:43 EDT 2011
Author: tbonfort
Date: 2011-10-14 05:43:43 -0700 (Fri, 14 Oct 2011)
New Revision: 12661
Modified:
trunk/mapserver/mapcache/src/source_mapserver.c
Log:
avoid segfaulting in case of error in mapserver image creation
Modified: trunk/mapserver/mapcache/src/source_mapserver.c
===================================================================
--- trunk/mapserver/mapcache/src/source_mapserver.c 2011-10-11 15:24:59 UTC (rev 12660)
+++ trunk/mapserver/mapcache/src/source_mapserver.c 2011-10-14 12:43:43 UTC (rev 12661)
@@ -104,6 +104,11 @@
msMapSetSize(omap, map->width, map->height);
imageObj *image = msDrawMap(omap, MS_FALSE);
+ if(!image) {
+ ctx->set_error(ctx,500,"mapserver failed to create image, check logs");
+ msFreeMap(omap);
+ return;
+ }
rasterBufferObj rb;
image->format->vtable->getRasterBufferHandle(image,&rb);
More information about the mapserver-commits
mailing list