Skip to content

Commit

Permalink
crash fix for #2224
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12386 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 9, 2009
1 parent 46f93fc commit 269cc08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsgeometry.cpp
Expand Up @@ -5172,7 +5172,7 @@ GEOSGeometry* QgsGeometry::reshapeLine( const GEOSGeometry* line, const GEOSGeom
return 0;
}

//make sure there are at least two instersction between line and reshape geometry
//make sure there are at least two intersection between line and reshape geometry
GEOSGeometry* intersectGeom = GEOSIntersection( line, reshapeLineGeos );
bool atLeastTwoIntersections = ( GEOSGeomTypeId( intersectGeom ) == GEOS_MULTIPOINT && GEOSGetNumGeometries( intersectGeom ) > 1 );
GEOSGeom_destroy( intersectGeom );
Expand Down Expand Up @@ -5334,7 +5334,7 @@ GEOSGeometry* QgsGeometry::reshapeLine( const GEOSGeometry* line, const GEOSGeom
}

//add the longest segment from the probable list for rings (only used for polygon rings)
if ( isRing )
if ( isRing && probableParts.size() > 0 )
{
GEOSGeometry* maxGeom = 0; //the longest geometry in the probabla list
GEOSGeometry* currentGeom = 0;
Expand Down

0 comments on commit 269cc08

Please sign in to comment.