Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix QgsGeometry::interpolateAngle for empty geometry
return 0.0 also for empty geometry
  • Loading branch information
agiudiceandrea authored and nyalldawson committed Apr 17, 2023
1 parent 9932f78 commit 663434f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeometry.cpp
Expand Up @@ -2625,7 +2625,7 @@ double QgsGeometry::lineLocatePoint( const QgsGeometry &point ) const

double QgsGeometry::interpolateAngle( double distance ) const
{
if ( !d->geometry )
if ( !d->geometry || d->geometry->isEmpty() )
return 0.0;

const QgsAbstractGeometry *geom = d->geometry->simplifiedTypeRef();
Expand Down

0 comments on commit 663434f

Please sign in to comment.