Skip to content
Permalink
Browse files

split geometry: cleanup parts if split failed (followup 6272274)

  • Loading branch information
jef-n committed Jul 12, 2013
1 parent 6023bdc commit 2df4bdcc885d7f4b39750de7a5979ebca08657aa
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/core/qgsgeometry.cpp
@@ -5470,15 +5470,20 @@ int QgsGeometry::splitPolygonGeometry( GEOSGeometry* splitLine, QList<QgsGeometr
mDirtyWkb = true;
}

for ( int i = 1; i < testedGeometries.size(); ++i )
int i;
for ( i = 1; i < testedGeometries.size() && GEOSisValid( testedGeometries[i] ); ++i )
;

if ( i < testedGeometries.size() )
{
if ( GEOSisValid( testedGeometries[i] ) != 1 )
for ( i = 0; i < testedGeometries.size(); ++i )
{
return 3;
GEOSGeom_destroy( testedGeometries[i] );
}
return 3;
}

for ( int i = 1; i < testedGeometries.size(); ++i )
for ( i = 1; i < testedGeometries.size(); ++i )
{
newGeometries << fromGeosGeom( testedGeometries[i] );
}

0 comments on commit 2df4bdc

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