Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix potential crash in QgsCircularString::vertexAngle
  • Loading branch information
nyalldawson committed Sep 19, 2017
1 parent 773d660 commit 0fba03f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/geometry/qgscircularstring.cpp
Expand Up @@ -893,6 +893,12 @@ void QgsCircularString::insertVertexBetween( int after, int before, int pointOnC

double QgsCircularString::vertexAngle( QgsVertexId vId ) const
{
if ( numPoints() < 3 )
{
//undefined
return 0.0;
}

int before = vId.vertex - 1;
int vertex = vId.vertex;
int after = vId.vertex + 1;
Expand Down

0 comments on commit 0fba03f

Please sign in to comment.