Skip to content
Permalink
Browse files

Fix crash when requesting invalid curve from compound curves

  • Loading branch information
nyalldawson committed Sep 21, 2017
1 parent e7b08d5 commit 840a9c104aba5b88488b22befa9d1c0c08cd40d6
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/geometry/qgscompoundcurve.cpp
@@ -385,7 +385,7 @@ QgsLineString *QgsCompoundCurve::curveToLine( double tolerance, SegmentationTole

const QgsCurve *QgsCompoundCurve::curveAt( int i ) const
{
if ( i >= mCurves.size() )
if ( i < 0 || i >= mCurves.size() )
{
return nullptr;
}

0 comments on commit 840a9c1

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