Skip to content

Commit

Permalink
Fix crash when requesting invalid curve from compound curves
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 21, 2017
1 parent e7b08d5 commit 840a9c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/geometry/qgscompoundcurve.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 840a9c1

Please sign in to comment.