[mapserver-commits] r11046 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Mar 3 14:19:39 EST 2011
Author: warmerdam
Date: 2011-03-03 11:19:39 -0800 (Thu, 03 Mar 2011)
New Revision: 11046
Modified:
trunk/mapserver/mapgdal.c
Log:
unlikely error condition recovery
Modified: trunk/mapserver/mapgdal.c
===================================================================
--- trunk/mapserver/mapgdal.c 2011-03-03 19:19:13 UTC (rev 11045)
+++ trunk/mapserver/mapgdal.c 2011-03-03 19:19:39 UTC (rev 11046)
@@ -334,6 +334,13 @@
break;
}
assert(pixptr);
+ if( pixptr == NULL )
+ {
+ msReleaseLock( TLOCK_GDAL );
+ msSetError( MS_MISCERR, "Missing RGB or A buffer.\n",
+ "msSaveImageGDAL()" );
+ return MS_FAILURE;
+ }
pabyData = (GByte *)(pixptr + iLine*rb.data.rgba.row_step);
GDALRasterIO( hBand, GF_Write, 0, iLine, image->width, 1,
pabyData, image->width, 1, GDT_Byte, rb.data.rgba.pixel_step, 0 );
More information about the mapserver-commits
mailing list