Skip to content

Commit

Permalink
Fix avoid crash when measuring empty geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro authored and nyalldawson committed Jun 6, 2016
1 parent ebdccf3 commit 1e8abb1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgsdistancearea.cpp
Expand Up @@ -889,6 +889,11 @@ void QgsDistanceArea::computeAreaInit()

double QgsDistanceArea::computePolygonArea( const QList<QgsPoint>& points ) const
{
if ( points.isEmpty() )
{
return 0;
}

double x1, y1, x2, y2, dx, dy;
double Qbar1, Qbar2;
double area;
Expand Down

0 comments on commit 1e8abb1

Please sign in to comment.