Skip to content

Commit 1e8abb1

Browse files
manisandronyalldawson
authored andcommitted
Fix avoid crash when measuring empty geometry
1 parent ebdccf3 commit 1e8abb1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/qgsdistancearea.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,11 @@ void QgsDistanceArea::computeAreaInit()
889889

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

0 commit comments

Comments
 (0)