Fix crash when calculating area for invalid circular string

This commit is contained in:
Nyall Dawson 2017-09-19 11:32:23 +10:00
parent 6205ca5ef7
commit 4e3eff947c

View File

@ -766,6 +766,9 @@ bool QgsCircularString::pointAt( int node, QgsPoint &point, QgsVertexId::VertexT
void QgsCircularString::sumUpArea( double &sum ) const
{
if ( numPoints() < 3 )
return;
int maxIndex = numPoints() - 1;
for ( int i = 0; i < maxIndex; i += 2 )