[geos-commits] r3049 - trunk/src/geom

svn_geos at osgeo.org svn_geos at osgeo.org
Sun Jun 20 21:34:51 EDT 2010


Author: strk
Date: 2010-06-21 01:34:51 +0000 (Mon, 21 Jun 2010)
New Revision: 3049

Modified:
   trunk/src/geom/Polygon.cpp
Log:
Make getInteriorRingN checked (API)


Modified: trunk/src/geom/Polygon.cpp
===================================================================
--- trunk/src/geom/Polygon.cpp	2010-06-21 01:05:00 UTC (rev 3048)
+++ trunk/src/geom/Polygon.cpp	2010-06-21 01:34:51 UTC (rev 3049)
@@ -194,6 +194,7 @@
 const LineString*
 Polygon::getInteriorRingN(size_t n) const
 {
+	if ( n >= holes->size() ) return 0;
 	return (LineString *) (*holes)[n];
 }
 



More information about the geos-commits mailing list