Skip to content

Commit

Permalink
Fix invalid return from QgsCircularString::pointN with negative indices
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 19, 2017
1 parent e5b1c67 commit 6205ca5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/geometry/qgscircularstring.cpp
Expand Up @@ -755,7 +755,7 @@ double QgsCircularString::closestSegment( const QgsPoint &pt, QgsPoint &segmentP

bool QgsCircularString::pointAt( int node, QgsPoint &point, QgsVertexId::VertexType &type ) const
{
if ( node >= numPoints() )
if ( node < 0 || node >= numPoints() )
{
return false;
}
Expand Down

0 comments on commit 6205ca5

Please sign in to comment.