Skip to content

Commit 6257e1f

Browse files
author
mhugent
committed
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
1 parent 5c52875 commit 6257e1f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/core/qgsgeometry.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -2659,11 +2659,15 @@ int QgsGeometry::addRing( const QList<QgsPoint>& ring )
26592659
{
26602660
newRing = createGeosLinearRing( ring.toVector() );
26612661
if ( !GEOSisValid( newRing ) )
2662-
throw GEOSException( "ring is invalid" );
2662+
{
2663+
throwGEOSException("ring is invalid");
2664+
}
26632665

26642666
newRingPolygon = createGeosPolygon( newRing );
26652667
if ( !GEOSisValid( newRingPolygon ) )
2666-
throw GEOSException( "ring polygon is invalid" );
2668+
{
2669+
throwGEOSException("ring is invalid");
2670+
}
26672671
}
26682672
catch ( GEOSException &e )
26692673
{

0 commit comments

Comments
 (0)