Skip to content

Commit

Permalink
fix #5487
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 30, 2012
1 parent a1bf57a commit cbd88ee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/qgsgeometry.cpp
Expand Up @@ -5572,8 +5572,11 @@ GEOSGeometry* QgsGeometry::reshapeLine( const GEOSGeometry* line, const GEOSGeom
{
//make sure there are at least two intersection between line and reshape geometry
GEOSGeometry* intersectGeom = GEOSIntersection( line, reshapeLineGeos );
atLeastTwoIntersections = ( GEOSGeomTypeId( intersectGeom ) == GEOS_MULTIPOINT && GEOSGetNumGeometries( intersectGeom ) > 1 );
GEOSGeom_destroy( intersectGeom );
if ( intersectGeom )
{
atLeastTwoIntersections = ( GEOSGeomTypeId( intersectGeom ) == GEOS_MULTIPOINT && GEOSGetNumGeometries( intersectGeom ) > 1 );
GEOSGeom_destroy( intersectGeom );
}
}
catch ( GEOSException &e )
{
Expand Down

0 comments on commit cbd88ee

Please sign in to comment.