[QGIS Commit] r10689 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Apr 30 17:26:23 EDT 2009


Author: mhugent
Date: 2009-04-30 17:26:23 -0400 (Thu, 30 Apr 2009)
New Revision: 10689

Modified:
   trunk/qgis/src/core/qgsgeometry.cpp
Log:
Call function throwGeosException to avoid segfault with invalid ring geometries. Fixes bug #1667

Modified: trunk/qgis/src/core/qgsgeometry.cpp
===================================================================
--- trunk/qgis/src/core/qgsgeometry.cpp	2009-04-30 14:39:59 UTC (rev 10688)
+++ trunk/qgis/src/core/qgsgeometry.cpp	2009-04-30 21:26:23 UTC (rev 10689)
@@ -2659,11 +2659,15 @@
   {
     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 )
   {



More information about the QGIS-commit mailing list