[geos-commits] r3046 - trunk/src/geom
svn_geos at osgeo.org
svn_geos at osgeo.org
Sun Jun 20 20:53:13 EDT 2010
Author: strk
Date: 2010-06-21 00:53:13 +0000 (Mon, 21 Jun 2010)
New Revision: 3046
Modified:
trunk/src/geom/GeometryCollection.cpp
Log:
Geometry::getGeometryN is an API function, so make it safe/checked
Modified: trunk/src/geom/GeometryCollection.cpp
===================================================================
--- trunk/src/geom/GeometryCollection.cpp 2010-06-21 00:44:38 UTC (rev 3045)
+++ trunk/src/geom/GeometryCollection.cpp 2010-06-21 00:53:13 UTC (rev 3046)
@@ -148,6 +148,7 @@
const Geometry*
GeometryCollection::getGeometryN(size_t n) const
{
+ if ( n >= geometries->size() ) return 0;
return (*geometries)[n];
}
More information about the geos-commits
mailing list