Skip to content
Permalink
Browse files

Call function throwGeosException to avoid segfault with invalid ring …

…geometries. Fixes bug #1667

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10689 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Apr 30, 2009
1 parent 5c52875 commit 6257e1fac2597b42b08cfd52e2e7f28b565fd0d3
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/core/qgsgeometry.cpp
@@ -2659,11 +2659,15 @@ int QgsGeometry::addRing( const QList<QgsPoint>& ring )
{
newRing = createGeosLinearRing( ring.toVector() );
if ( !GEOSisValid( newRing ) )
throw GEOSException( "ring is invalid" );
{
throwGEOSException("ring is invalid");
}

newRingPolygon = createGeosPolygon( newRing );
if ( !GEOSisValid( newRingPolygon ) )
throw GEOSException( "ring polygon is invalid" );
{
throwGEOSException("ring is invalid");
}
}
catch ( GEOSException &e )
{

0 comments on commit 6257e1f

Please sign in to comment.
You can’t perform that action at this time.