Skip to content

Commit

Permalink
split geometry: cleanup parts if split failed (followup 6272274)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 12, 2013
1 parent 6023bdc commit 2df4bdc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/core/qgsgeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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] );
}
Expand Down

0 comments on commit 2df4bdc

Please sign in to comment.