Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fd9db82

Browse files
agiudiceandreagithub-actions[bot]
authored andcommittedApr 17, 2023
Fix QgsGeometry::interpolateAngle for empty geometry
return 0.0 also for empty geometry
1 parent 8e4c500 commit fd9db82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/core/geometry/qgsgeometry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2574,7 +2574,7 @@ double QgsGeometry::lineLocatePoint( const QgsGeometry &point ) const
25742574

25752575
double QgsGeometry::interpolateAngle( double distance ) const
25762576
{
2577-
if ( !d->geometry )
2577+
if ( !d->geometry || d->geometry->isEmpty() )
25782578
return 0.0;
25792579

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

0 commit comments

Comments
 (0)
Please sign in to comment.