Skip to content
Permalink
Browse files

Fix potential crash when calling QgsCircularString::pointN with bad

index
  • Loading branch information
nyalldawson committed Sep 18, 2017
1 parent e937782 commit afcb82efe7696b03e3cc9c5d8f2ac76ea97d2ed5
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/geometry/qgscircularstring.cpp
@@ -389,7 +389,7 @@ int QgsCircularString::numPoints() const

QgsPoint QgsCircularString::pointN( int i ) const
{
if ( std::min( mX.size(), mY.size() ) <= i )
if ( i < 0 || std::min( mX.size(), mY.size() ) <= i )
{
return QgsPoint();
}

0 comments on commit afcb82e

Please sign in to comment.
You can’t perform that action at this time.