Skip to content

Commit 42fa83c

Browse files
manisandronyalldawson
authored andcommittedJun 30, 2016
Fix avoid crash when measuring empty geometry
1 parent ae6592d commit 42fa83c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/core/qgsdistancearea.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,11 @@ void QgsDistanceArea::computeAreaInit()
890890

891891
double QgsDistanceArea::computePolygonArea( const QList<QgsPoint>& points ) const
892892
{
893+
if ( points.isEmpty() )
894+
{
895+
return 0;
896+
}
897+
893898
double x1, y1, x2, y2, dx, dy;
894899
double Qbar1, Qbar2;
895900
double area;

0 commit comments

Comments
 (0)
Please sign in to comment.