Skip to content

Commit afcb82e

Browse files
committedSep 19, 2017
Fix potential crash when calling QgsCircularString::pointN with bad
index
1 parent e937782 commit afcb82e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/core/geometry/qgscircularstring.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ int QgsCircularString::numPoints() const
389389

390390
QgsPoint QgsCircularString::pointN( int i ) const
391391
{
392-
if ( std::min( mX.size(), mY.size() ) <= i )
392+
if ( i < 0 || std::min( mX.size(), mY.size() ) <= i )
393393
{
394394
return QgsPoint();
395395
}

0 commit comments

Comments
 (0)
Please sign in to comment.